mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Fixed back button issue then open pushState link in browser without pushState support
This commit is contained in:
@@ -805,7 +805,7 @@
|
||||
var atRoot = loc.pathname == this.options.root;
|
||||
if (this._wantsPushState && !this._hasPushState && !atRoot) {
|
||||
this.fragment = this.getFragment(null, true);
|
||||
window.location = this.options.root + '#' + this.fragment;
|
||||
window.location.replace(this.options.root + '#' + this.fragment);
|
||||
} else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
|
||||
this.fragment = loc.hash.replace(hashStrip, '');
|
||||
window.history.replaceState({}, document.title, loc.protocol + '//' + loc.host + this.options.root + this.fragment);
|
||||
|
||||
Reference in New Issue
Block a user