From 0ab1af10b44e936966d0ed8cb76d48f2fc96bedf Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Wed, 14 Sep 2022 16:12:45 +0530 Subject: [PATCH] fix: shared view meta validation during load Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nc-gui/composables/useGridViewColumnWidth.ts | 2 +- packages/nc-gui/composables/useSharedView.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useGridViewColumnWidth.ts b/packages/nc-gui/composables/useGridViewColumnWidth.ts index 544f4f3c72..886b2436b8 100644 --- a/packages/nc-gui/composables/useGridViewColumnWidth.ts +++ b/packages/nc-gui/composables/useGridViewColumnWidth.ts @@ -39,7 +39,7 @@ export function useGridViewColumnWidth(view: Ref) { const loadGridViewColumns = async () => { if ((!view.value || view.value?.id) && !isPublic.value) return - const colsData: GridColumnType[] = isPublic.value ? columns.value : await $api.dbView.gridColumnsList(view.value!.id!) + const colsData: GridColumnType[] = (isPublic.value ? columns.value : await $api.dbView.gridColumnsList(view.value!.id!)) ?? [] gridViewCols.value = colsData.reduce>( (o, col) => ({ ...o, diff --git a/packages/nc-gui/composables/useSharedView.ts b/packages/nc-gui/composables/useSharedView.ts index 421891846f..336aa3ea65 100644 --- a/packages/nc-gui/composables/useSharedView.ts +++ b/packages/nc-gui/composables/useSharedView.ts @@ -29,8 +29,6 @@ export function useSharedView() { const { setMeta } = useMetas() const loadSharedView = async (viewId: string, localPassword: string | undefined = undefined) => { - if (!meta.value) return - const viewMeta: Record = await $api.public.sharedViewMetaGet(viewId, { headers: { 'xc-password': localPassword ?? password.value,