Skip to content

Commit

Permalink
🩹 [PageLoad] Remove hash from url
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 29, 2024
1 parent 004edd1 commit ad3b2e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripts/PageLoad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export class PageLoad {
}

static #handleReadyState() {
// Before running the timer to "update document", we want to make sure any
// hash URL is removed and we reset our scroll position.
history.replaceState(null, '', ' ');
window.scrollTo(0, 0);

window.setTimeout(PageLoad.#updateDocument, PageLoad.MOTION_DELAY);
}

Expand Down

0 comments on commit ad3b2e1

Please sign in to comment.