mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 22:22:21 +08:00
removing trailing slashes
This commit is contained in:
parent
05c03936fe
commit
35e25b5a64
1 changed files with 2 additions and 0 deletions
|
|
@ -100,6 +100,8 @@ const routes: Route[] = [
|
|||
];
|
||||
|
||||
export function navigate(url = window.location.pathname): void {
|
||||
url = url.replace(/\/$/, "");
|
||||
if (url === "") url = "/";
|
||||
history.pushState(null, "", url);
|
||||
router();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue