Browse Source

fix: check colOptions defined

pull/7392/head
Pranav C 10 months ago
parent
commit
792e5dcac9
  1. 1
      packages/nc-gui/utils/columnUtils.ts

1
packages/nc-gui/utils/columnUtils.ts

@ -184,7 +184,6 @@ const isColumnRequired = (col?: ColumnType) => col && col.rqd && !col.cdf && !co
const isVirtualColRequired = (col: ColumnType, columns: ColumnType[]) =>
col.uidt === UITypes.LinkToAnotherRecord &&
// in some cases we just have type and name so we need to confirm colOptions is there
col.colOptions &&
(<LinkToAnotherRecordType>col.colOptions).type === RelationTypes.BELONGS_TO &&
isColumnRequired(columns.find((c) => c.id === (<LinkToAnotherRecordType>col.colOptions).fk_child_column_id))

Loading…
Cancel
Save