[Pkg-javascript-commits] [backbone] 12/21: do not call loadUrl when redirecting to hash based URL on non-push state browser
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:01:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.2
in repository backbone.
commit b32a34c52fe42cabb09837a6033829a5b84d5266
Author: Raimonds Simanovskis <raimonds.simanovskis at gmail.com>
Date: Fri Jul 22 17:55:09 2011 +0300
do not call loadUrl when redirecting to hash based URL on non-push state browser
---
backbone.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backbone.js b/backbone.js
index 14431e7..c793c65 100644
--- a/backbone.js
+++ b/backbone.js
@@ -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);
--
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