Fixes #490 -- named, but not splatted params, must match at least one character.

This commit is contained in:
Jeremy Ashkenas
2012-01-23 11:00:09 -05:00
parent 96a7274cf7
commit 49804535dc

View File

@@ -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 + '$');
},