Skip to content

Commit

Permalink
Hotfix: Browser navigation between Documents (#17783)
Browse files Browse the repository at this point in the history
use `replaceState` over `pushState`
  • Loading branch information
nielslyngsoe authored Dec 11, 2024
1 parent 5f291ba commit 968cb1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class UmbWorkspaceIsNewRedirectController extends UmbControllerBase {
id: unique,
});
this.destroy();
window.history.pushState({}, '', newPath);
window.history.replaceState({}, '', newPath);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ export class UmbDocumentWorkspaceEditorElement extends UmbLitElement {

if (!route) {
// TODO: Notice: here is a specific index used for fallback, this could be made more solid [NL]
history.pushState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`);
history.replaceState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`);
return;
}

history.pushState({}, '', `${this.#workspaceRoute}/${route?.path}`);
history.replaceState({}, '', `${this.#workspaceRoute}/${route?.path}`);
},
});
}
Expand Down

0 comments on commit 968cb1a

Please sign in to comment.