diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 180b1a2b5d..bd103ea239 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -232,10 +232,11 @@ loc.path[2] = (currentAppAlias as string) ?? resolved.defaultLocation.path[2] loc.path[3] = currentSpace ?? (currentSpecial as string) ?? resolved.defaultLocation.path[3] if (loc.path[3] !== undefined) { - loc.path[4] = - (currentSpace !== undefined ? currentSpecial : undefined) ?? - (asideId as string) ?? - resolved.defaultLocation.path[4] + if (loc.path[3] === resolved.defaultLocation.path[3]) { + loc.path[4] = resolved.defaultLocation.path[4] + } else { + loc.path[4] = (currentSpace && currentSpecial) ?? (asideId as string) + } } else { loc.path.length = 4 }