Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tweaking transparent URL upgrades.

  • Loading branch information...
commit 0798d9767224dac51435e149c319a6051dab4843 1 parent 2e1f85d
@jashkenas authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 backbone.js
View
5 backbone.js
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.