userpage: use window.pages.MyAccount instead of

window.location.pathname

fixes #418 hopefully.
This commit is contained in:
Harvey Tindall
2025-07-18 13:23:25 +01:00
parent a0165f6f02
commit 488ba7be38
4 changed files with 14 additions and 8 deletions
+1
View File
@@ -24,6 +24,7 @@ export class PageManager {
private _overridePushState = () => {
const pushState = window.history.pushState;
window.history.pushState = function (data: any, __: string, _: string | URL) {
console.debug("Pushing state", arguments);
pushState.apply(window.history, arguments);
let ev = { state: data as string } as PopStateEvent;
window.onpopstate(ev);
+2 -1
View File
@@ -24,7 +24,8 @@ interface userWindow extends GlobalWindow {
declare var window: userWindow;
const basePath = window.location.pathname.replace("/password/reset", "");
// const basePath = window.location.pathname.replace("/password/reset", "");
const basePath = window.pages.MyAccount;
const theme = new ThemeManager(document.getElementById("button-theme"));