Browse Source

fix(nc-gui): Property `workspaceRole` was accessed during render but is not defined on instance

pull/7855/head
Ramesh Mane 8 months ago
parent
commit
e27be408b4
  1. 2
      packages/nc-gui/components/workspace/CollaboratorsList.vue
  2. 3
      packages/nc-gui/store/workspace.ts

2
packages/nc-gui/components/workspace/CollaboratorsList.vue

@ -8,7 +8,7 @@ const workspaceStore = useWorkspace()
const { removeCollaborator, updateCollaborator: _updateCollaborator } = workspaceStore
const { collaborators } = storeToRefs(workspaceStore)
const { collaborators, workspaceRole } = storeToRefs(workspaceStore)
const { sorts, sortDirection, loadSorts, saveOrUpdate, handleGetSortedData } = useUserSorts('Workspace')

3
packages/nc-gui/store/workspace.ts

@ -48,6 +48,8 @@ export const useWorkspace = defineStore('workspaceStore', () => {
return { id: 'default', title: 'default', meta: {}, roles: '' } as any
})
const workspaceRole = computed(() => activeWorkspace.value?.roles)
const activeWorkspaceMeta = computed<Record<string, any>>(() => {
const defaultMeta = {}
if (!activeWorkspace.value) return defaultMeta
@ -253,6 +255,7 @@ export const useWorkspace = defineStore('workspaceStore', () => {
isWorkspaceSettingsPageOpened,
workspaceUserCount,
getPlanLimit,
workspaceRole,
}
})

Loading…
Cancel
Save