Browse Source

fix: null check (#8845)

pull/8850/head
Anbarasu 6 months ago committed by GitHub
parent
commit
72b25a83e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/composables/useViewAggregate.ts

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

@ -38,7 +38,7 @@ const [useProvideViewAggregate, useViewAggregate] = useInjectionState(
field: gridField,
column: f.field,
index: f.index,
width: `${Number(gridField.width.replace('px', ''))}px` || '180px',
width: `${Number((gridField.width ?? '').replace('px', ''))}px` || '180px',
}
})
})
@ -116,6 +116,8 @@ const [useProvideViewAggregate, useViewAggregate] = useInjectionState(
const fieldAggregateMapping = _fields.field.reduce((acc, field) => {
const f = fields.value.find((f) => f.title === field)
if (!f?.id) return acc
acc[f.id] = gridViewCols.value[f.id].aggregation ?? CommonAggregations.None
return acc

Loading…
Cancel
Save