Skip to content

Commit

Permalink
[fixed] Ignore extraneous popstate events in WebKit
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Feb 17, 2015
1 parent 0edfac4 commit 3d8a883
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/locations/HistoryLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function notifyChange(type) {

var _isListening = false;

function onPopState() {
function onPopState(event) {
if (event.state === undefined)
return; // Ignore extraneous popstate events in WebKit.

notifyChange(LocationActions.POP);
}

Expand Down

0 comments on commit 3d8a883

Please sign in to comment.