Skip to content

Commit 4e15333

Browse files
committed
fix pushState order
1 parent 550df9e commit 4e15333

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/js/router.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ class AnatoloRouter {
106106

107107
await this.__animating.unitl(false);
108108

109-
$('main-outlet').html(body);
110-
document.title = title;
111-
112109
if (pushState) {
113-
history.pushState({ time: new Date() }, title, url);
110+
history.pushState({ time: new Date(), url: url }, '', url);
114111
}
115112

113+
$('main-outlet').html(body);
114+
document.title = title;
115+
116116
this.updateRouterState({
117117
url: document.location.href,
118118
body,

0 commit comments

Comments
 (0)