Browse Source

fix: shared view meta validation during load

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3606/head
Raju Udava 2 years ago committed by braks
parent
commit
0ab1af10b4
  1. 2
      packages/nc-gui/composables/useGridViewColumnWidth.ts
  2. 2
      packages/nc-gui/composables/useSharedView.ts

2
packages/nc-gui/composables/useGridViewColumnWidth.ts

@ -39,7 +39,7 @@ export function useGridViewColumnWidth(view: Ref<GridType | undefined>) {
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<Record<string, GridColumnType>>(
(o, col) => ({
...o,

2
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<string, any> = await $api.public.sharedViewMetaGet(viewId, {
headers: {
'xc-password': localPassword ?? password.value,

Loading…
Cancel
Save