diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 3bb1c5ca53..b9a1173d65 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -136,18 +136,19 @@ if (currentApp !== app) { clear(1) currentApp = app - if (space === undefined) { - const last = localStorage.getItem(`platform_last_loc_${currentApp}`) - if (last !== null) { - const newLocation: Location = JSON.parse(last) - loc.path[2] = space = newLocation.path[2] as Ref - loc.path[3] = special = newLocation.path[3] - } - } currentApplication = await client.findOne(workbench.class.Application, { _id: currentApp }) navigatorModel = currentApplication?.navigatorModel } + if (space === undefined) { + const last = localStorage.getItem(`platform_last_loc_${currentApp}`) + if (last !== null) { + const newLocation: Location = JSON.parse(last) + loc.path[2] = space = newLocation.path[2] as Ref + loc.path[3] = special = newLocation.path[3] + } + } + if (currentSpecial === undefined || currentSpecial !== space) { const newSpecial = space !== undefined ? getSpecialComponent(space) : undefined if (newSpecial !== undefined) {