Skip to content

Commit

Permalink
fix pushState order
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Aug 3, 2024
1 parent 550df9e commit 4e15333
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ class AnatoloRouter {

await this.__animating.unitl(false);

$('main-outlet').html(body);
document.title = title;

if (pushState) {
history.pushState({ time: new Date() }, title, url);
history.pushState({ time: new Date(), url: url }, '', url);
}

$('main-outlet').html(body);
document.title = title;

this.updateRouterState({
url: document.location.href,
body,
Expand Down

0 comments on commit 4e15333

Please sign in to comment.