tweaking transparent URL upgrades.

This commit is contained in:
Jeremy Ashkenas
2011-07-01 13:54:56 -04:00
parent 2e1f85d8ec
commit 0798d97672

View File

@@ -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;
}