mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
tweaking transparent URL upgrades.
This commit is contained in:
@@ -802,9 +802,12 @@
|
||||
this.fragment = fragment;
|
||||
historyStarted = true;
|
||||
var started = this.loadUrl() || this.loadUrl(window.location.hash);
|
||||
if (this._wantsPushState && !this._hasPushState && window.location.pathname != this.options.root) {
|
||||
var atRoot = window.location.pathname == this.options.root;
|
||||
if (this._wantsPushState && !this._hasPushState && !atRoot) {
|
||||
this.fragment = this.getFragment(null, true);
|
||||
window.location = this.options.root + '#' + this.fragment;
|
||||
} else if (this._wantsPushState && this._hasPushState && atRoot && window.location.hash) {
|
||||
this.navigate(window.location.hash);
|
||||
} else {
|
||||
return started;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user