Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1155 from njam/issue-1155
Browse files Browse the repository at this point in the history
Fix page stateChange for hash-based navigation (IE9)
  • Loading branch information
njam committed Apr 25, 2014
2 parents 35ecc6e + 02dfb95 commit 348468f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/CM/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1136,15 +1136,15 @@ var CM_App = CM_Class_Abstract.extend({
/**
* @returns Location
*/
_getLocation: function() {
getLocation: function() {
return window.history.location || document.location;
},

/**
* @returns string
*/
_getFragment: function() {
var location = this._getLocation();
var location = this.getLocation();
return location.pathname + location.search;
},

Expand Down
2 changes: 1 addition & 1 deletion library/CM/Page/Abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var CM_Page_Abstract = CM_Component_Abstract.extend({
CM_Component_Abstract.prototype._ready.call(this);

if (this.hasStateParams()) {
var location = window.location;
var location = cm.router.getLocation();
var params = queryString.parse(location.search);
var state = _.pick(params, _.intersection(_.keys(params), this.getStateParams()));
this.routeToState(state, location.pathname + location.search);
Expand Down

0 comments on commit 348468f

Please sign in to comment.