Browse Source

feat(nc-gui): feed default meta in projectMeta

pull/5106/head
Wing-Kam Wong 2 years ago
parent
commit
4384700392
  1. 7
      packages/nc-gui/composables/useProject.ts

7
packages/nc-gui/composables/useProject.ts

@ -51,10 +51,13 @@ export const useProject = createSharedComposable(() => {
const projectType = $computed(() => route.params.projectType as string)
const projectMeta = computed<Record<string, any>>(() => {
const defaultMeta = {
showNullAndEmptyInFilter: false,
}
try {
return isString(project.value.meta) ? JSON.parse(project.value.meta) : project.value.meta
return (isString(project.value.meta) ? JSON.parse(project.value.meta) : project.value.meta) ?? defaultMeta
} catch (e) {
return {}
return defaultMeta
}
})

Loading…
Cancel
Save