Fix Canvas nav link in env with spaces (#67127)
This commit is contained in:
parent
0fd96e4d01
commit
484e0a99ad
|
@ -74,10 +74,12 @@ export class CanvasPlugin
|
|||
this.srcPlugin.setup(core, { canvas: canvasApi });
|
||||
|
||||
// Set the nav link to the last saved url if we have one in storage
|
||||
const lastUrl = getSessionStorage().get(SESSIONSTORAGE_LASTPATH);
|
||||
if (lastUrl) {
|
||||
const lastPath = getSessionStorage().get(
|
||||
`${SESSIONSTORAGE_LASTPATH}:${core.http.basePath.get()}`
|
||||
);
|
||||
if (lastPath) {
|
||||
this.appUpdater.next(() => ({
|
||||
defaultPath: `#${lastUrl}`,
|
||||
defaultPath: `#${lastPath}`,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ export const navLinkServiceFactory: CanvasServiceFactory<NavLinkService> = (
|
|||
defaultPath: `#${path}`,
|
||||
}));
|
||||
|
||||
getSessionStorage().set(SESSIONSTORAGE_LASTPATH, path);
|
||||
getSessionStorage().set(`${SESSIONSTORAGE_LASTPATH}:${coreSetup.http.basePath.get()}`, path);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue