do not call loadUrl when redirecting to hash based URL on non-push state browser

This commit is contained in:
Raimonds Simanovskis
2011-07-22 17:55:09 +03:00
parent a6a478fd48
commit b32a34c52f

View File

@@ -806,6 +806,8 @@
if (this._wantsPushState && !this._hasPushState && !atRoot) {
this.fragment = this.getFragment(null, true);
window.location.replace(this.options.root + '#' + this.fragment);
// Return immediately as browser will do redirect to new url
return true;
} 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);