From 7ad85f8fc087253307a2196124675aedf6904137 Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Sat, 11 Jun 2022 00:01:57 +0600 Subject: [PATCH] TSK-47 fix (#2058) Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> --- .../src/components/Workbench.svelte | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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) {