Browse Source

fix: add optional chaining to field pv

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5060/head
mertmit 2 years ago
parent
commit
dc997ada56
  1. 4
      packages/nc-gui/composables/useViewColumns.ts

4
packages/nc-gui/composables/useViewColumns.ts

@ -173,7 +173,7 @@ export function useViewColumns(
const filteredFieldList = computed(() => { const filteredFieldList = computed(() => {
return ( return (
fields.value?.filter((field: Field) => { fields.value?.filter((field: Field) => {
if (metaColumnById?.value?.[field.fk_column_id!].pv) return true if (metaColumnById?.value?.[field.fk_column_id!]?.pv) return true
// hide system columns if not enabled // hide system columns if not enabled
if (!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[field.fk_column_id!])) { if (!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[field.fk_column_id!])) {
@ -198,7 +198,7 @@ export function useViewColumns(
metaColumnById.value && metaColumnById.value &&
metaColumnById?.value?.[field.fk_column_id!] && metaColumnById?.value?.[field.fk_column_id!] &&
isSystemColumn(metaColumnById.value?.[field.fk_column_id!]) && isSystemColumn(metaColumnById.value?.[field.fk_column_id!]) &&
!metaColumnById.value?.[field.fk_column_id!].pv !metaColumnById.value?.[field.fk_column_id!]?.pv
) { ) {
return false return false
} }

Loading…
Cancel
Save