mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-22 21:38:00 -05:00
Fixes #490 -- named, but not splatted params, must match at least one character.
This commit is contained in:
@@ -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 + '$');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user