Skip to content

Commit

Permalink
- fixing condition in popstate event handler; since e is jQuery Eve…
Browse files Browse the repository at this point in the history
…nt Object, there is no `state` property defined, we need to use `e.originalEvent.state` instead
  • Loading branch information
zipper committed Jan 24, 2017
1 parent b5946b6 commit 188a9e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client-side/history.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $.nette.ext('history', {
var state = e.originalEvent.state || this.initialState;
var initialPop = (!this.popped && initialUrl === state.href);
this.popped = true;
if (initialPop || !e.state) {
if (initialPop || !e.originalEvent.state) {
return;
}
if (this.cache && state.ui) {
Expand Down

0 comments on commit 188a9e4

Please sign in to comment.