fix: avoid trying to load workspace while deleting and after deleting workspace

This commit is contained in:
Pranav C
2025-03-17 13:30:05 +00:00
parent 032dd76ddd
commit 2e29132b3d
4 changed files with 9 additions and 7 deletions

View File

@@ -13,13 +13,14 @@ const { isUIAllowed } = useRoles()
const workspaceStore = useWorkspace()
const { loadRoles } = useRoles()
const { activeWorkspace: _activeWorkspace, workspaces } = storeToRefs(workspaceStore)
const { activeWorkspace: _activeWorkspace, workspaces, deletingWorkspace } = storeToRefs(workspaceStore)
const { loadCollaborators, loadWorkspace } = workspaceStore
const orgStore = useOrg()
const { orgId, org } = storeToRefs(orgStore)
const currentWorkspace = computedAsync(async () => {
if (deletingWorkspace.value) return
let ws
if (props.workspaceId) {
ws = workspaces.value.get(props.workspaceId)