diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index b9a1173d65..b8735543ae 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -129,9 +129,9 @@ ) async function syncLoc (loc: Location): Promise { - const app = loc.path.length > 0 ? (loc.path[1] as Ref) : undefined - let space = loc.path.length > 1 ? (loc.path[2] as Ref) : undefined - let special = loc.path.length > 2 ? loc.path[3] : undefined + const app = loc.path.length > 1 ? (loc.path[1] as Ref) : undefined + let space = loc.path.length > 2 ? (loc.path[2] as Ref) : undefined + let special = loc.path.length > 3 ? loc.path[3] : undefined if (currentApp !== app) { clear(1) @@ -141,7 +141,7 @@ } if (space === undefined) { - const last = localStorage.getItem(`platform_last_loc_${currentApp}`) + const last = localStorage.getItem(`platform_last_loc_${app}`) if (last !== null) { const newLocation: Location = JSON.parse(last) loc.path[2] = space = newLocation.path[2] as Ref @@ -161,7 +161,7 @@ } } if (app !== undefined) { - localStorage.setItem(`platform_last_loc_${currentApp}`, JSON.stringify(loc)) + localStorage.setItem(`platform_last_loc_${app}`, JSON.stringify(loc)) } }