-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue-1484: start controller replace history
- Loading branch information
1 parent
31b2322
commit 87dc378
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,16 @@ define([ | |
setStartLocation: function() { | ||
if (!this.isEnabled()) return; | ||
|
||
window.location.hash = this.getStartHash(); | ||
var hash = this.getStartHash(); | ||
|
||
if ('replaceState' in window.history) { | ||
window.history.replaceState('', '', hash); | ||
} else { | ||
// < ie9 | ||
if (window.location.hash !== hash) window.history.back(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
oliverfoster
Author
Member
|
||
window.location.hash = newhash; | ||
} | ||
|
||
}, | ||
|
||
getStartHash: function(alwaysForce) { | ||
|
@@ -90,4 +99,4 @@ define([ | |
|
||
return StartController; | ||
|
||
}); | ||
}); |
Should there be braces here?