[Pkg-javascript-commits] [backbone] 211/211: tweaking transparent URL upgrades.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.0
in repository backbone.
commit 0798d9767224dac51435e149c319a6051dab4843
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Fri Jul 1 13:54:56 2011 -0400
tweaking transparent URL upgrades.
---
backbone.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index a2ac89e..cce2dcc 100644
--- a/backbone.js
+++ b/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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list