Skip to content

Commit 7563419

Browse files
committed
Move replaceState to a more appropriate place
1 parent ba311c9 commit 7563419

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

static/canjs.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ function navigate(href) {
195195
return;
196196
}
197197

198-
window.history.pushState(null, null, href);
199-
200198
// clear existing scroll interval if it's still alive
201199
clearInterval(scrollPositionInterval);
202200

@@ -220,6 +218,9 @@ function navigate(href) {
220218
return xhr;
221219
},
222220
success: function(content) {
221+
222+
window.history.pushState(null, null, href);
223+
223224
// Google Analytics
224225
ga('send', 'pageview', window.location.pathname);
225226

0 commit comments

Comments
 (0)