File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,8 @@ class Node {
6767 if ( segment . constructor === String ) {
6868 // Fast path
6969 let res = this . _children [ _keyPrefix + segment ] ;
70- if ( ! res && segment !== '' ) {
71- // Fall back to the wildcard match, but only if the segment is
72- // non-empty.
70+ if ( ! res ) {
71+ // Fall back to the wildcard match.
7372 res = this . _children [ '*' ] ;
7473 if ( ! res && this . _children [ '**' ] ) {
7574 res = this . _children [ '**' ] ;
Original file line number Diff line number Diff line change 11{
22 "name" : " swagger-router" ,
3- "version" : " 0.5.3 " ,
3+ "version" : " 0.5.4 " ,
44 "description" : " An efficient swagger 2 based router with support for multiple APIs. For use in RESTBase." ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -262,9 +262,10 @@ var expectations = {
262262 '/en.wikipedia.org/v1/optional/' : {
263263 params : {
264264 domain : 'en.wikipedia.org' ,
265+ path : '' ,
265266 _ls : [ ]
266267 } ,
267- value : null ,
268+ value : '/optional/{+path}' ,
268269 permissions : [ ] ,
269270 filters : [ ]
270271 } ,
@@ -277,6 +278,16 @@ var expectations = {
277278 permissions : [ ] ,
278279 filters : [ ]
279280 } ,
281+ '/en.wikipedia.org/v1/optional/path/' : {
282+ value : '/optional/{+path}' ,
283+ params : {
284+ domain : 'en.wikipedia.org' ,
285+ path : 'path/' ,
286+ _ls : [ ]
287+ } ,
288+ permissions : [ ] ,
289+ filters : [ ]
290+ } ,
280291 '/en.wikipedia.org/v1/optional/path/bits' : {
281292 value : '/optional/{+path}' ,
282293 params : {
You can’t perform that action at this time.
0 commit comments