Skip to content

Commit b5946b6

Browse files
Merge pull request vojtech-dobes#33 from ne0-cz/safari-popstate-bug
client-side: fixed initial popstate callback being called on page load in Safari
2 parents 9f606db + 4d31108 commit b5946b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client-side/history.ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $.nette.ext('history', {
4848
var state = e.originalEvent.state || this.initialState;
4949
var initialPop = (!this.popped && initialUrl === state.href);
5050
this.popped = true;
51-
if (initialPop) {
51+
if (initialPop || !e.state) {
5252
return;
5353
}
5454
if (this.cache && state.ui) {

0 commit comments

Comments
 (0)