mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 12:25:17 +00:00
Fixed workbench workspaces load (#2433)
This commit is contained in:
parent
130a19daa9
commit
8093875c64
@ -29,14 +29,18 @@
|
||||
|
||||
export let workspaces: Workspace[]
|
||||
|
||||
let _workspaces: Workspace[] = []
|
||||
|
||||
onMount(() => {
|
||||
if (workspaces.length === 0) {
|
||||
getWorkspaces().then((ws: Workspace[]) => (workspaces = ws))
|
||||
getWorkspaces().then((ws: Workspace[]) => (_workspaces = ws))
|
||||
} else {
|
||||
_workspaces = workspaces
|
||||
}
|
||||
})
|
||||
|
||||
$: actions = [
|
||||
...workspaces.map((w) => ({
|
||||
..._workspaces.map((w) => ({
|
||||
label: getEmbeddedLabel(w.workspace),
|
||||
action: async () => {
|
||||
const loginInfo = (await selectWorkspace(w.workspace))[1]
|
||||
|
Loading…
Reference in New Issue
Block a user