[Pkg-javascript-commits] [backbone] 242/281: Fixes #490 -- named, but not splatted params, must match at least one character.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9.0
in repository backbone.

commit 49804535dc4bfd3bcc0c29a676080059e73059b8
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Mon Jan 23 11:00:09 2012 -0500

    Fixes #490 -- named, but not splatted params, must match at least one character.
---
 backbone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index 9926c07..c407e54 100644
--- a/backbone.js
+++ b/backbone.js
@@ -754,7 +754,7 @@
     // against the current location hash.
     _routeToRegExp: function(route) {
       route = route.replace(escapeRegExp, '\\$&')
-                   .replace(namedParam, '([^\/]*)')
+                   .replace(namedParam, '([^\/]+)')
                    .replace(splatParam, '(.*?)');
       return new RegExp('^' + route + '$');
     },

-- 
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