Skip to content

Commit 3d8a883

Browse files
committed
[fixed] Ignore extraneous popstate events in WebKit
Fixes #753
1 parent 0edfac4 commit 3d8a883

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/locations/HistoryLocation.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ function notifyChange(type) {
2525

2626
var _isListening = false;
2727

28-
function onPopState() {
28+
function onPopState(event) {
29+
if (event.state === undefined)
30+
return; // Ignore extraneous popstate events in WebKit.
31+
2932
notifyChange(LocationActions.POP);
3033
}
3134

0 commit comments

Comments
 (0)