diff --git a/apps/zui/src/app/features/inspector/views/type-record-view.ts b/apps/zui/src/app/features/inspector/views/type-record-view.ts index 984225f67a..5e57ab7573 100644 --- a/apps/zui/src/app/features/inspector/views/type-record-view.ts +++ b/apps/zui/src/app/features/inspector/views/type-record-view.ts @@ -8,7 +8,7 @@ export class TypeRecordView extends ContainerView { } count() { - return this.value.fields.length + return this.value.fields?.length || 0 } openToken() { @@ -21,6 +21,7 @@ export class TypeRecordView extends ContainerView { *iterate(n?: number) { const fields = this.value.fields + if (!fields) return const length = n ? Math.min(n, fields.length) : fields.length for (let i = 0; i < fields.length; ++i) {