Browse Source

fix(nc-gui): optional chain expressions can return undefined by design

pull/5307/head
Wing-Kam Wong 2 years ago
parent
commit
71967b6874
  1. 4
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

4
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -83,7 +83,9 @@ export default defineComponent({
if (column && column.value) { if (column && column.value) {
if (isMm(column.value) || isHm(column.value) || isBt(column.value) || isLookup(column.value) || isRollup(column.value)) { if (isMm(column.value) || isHm(column.value) || isBt(column.value) || isLookup(column.value) || isRollup(column.value)) {
const meta = inject(MetaInj, ref()) const meta = inject(MetaInj, ref())
relationColumn = meta.value?.columns?.find((c) => c.id === column.value?.colOptions?.fk_relation_column_id)! relationColumn = meta.value?.columns?.find(
(c) => c.id === column.value?.colOptions?.fk_relation_column_id,
) as ColumnType
} }
} }

Loading…
Cancel
Save