From 49804535dc4bfd3bcc0c29a676080059e73059b8 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 23 Jan 2012 11:00:09 -0500 Subject: [PATCH] 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 9926c07b..c407e54a 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 + '$'); },