@@ -106,7 +106,7 @@ const Router = module.exports =
106
106
[ [ 'path' , 'string' ] , ...repeat ( Math . max ( 1 , args . length - 2 ) , [ 'handler' , 'function' ] ) , [ 'name' , 'string' ] ] ,
107
107
[ [ 'path' , 'string' ] , ...repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] ) ] ,
108
108
[ ...repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] ) , [ 'name' , 'string' ] ] ,
109
- repeat ( args . length , [ 'handler' , 'function' ] )
109
+ repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] )
110
110
) ;
111
111
const path = argv . path ;
112
112
const handler = argv . handler ;
@@ -130,7 +130,7 @@ ALL_METHODS.forEach(function (method) {
130
130
[ [ 'path' , 'string' ] , ...repeat ( Math . max ( 1 , args . length - 2 ) , [ 'handler' , 'function' ] ) , [ 'name' , 'string' ] ] ,
131
131
[ [ 'path' , 'string' ] , ...repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] ) ] ,
132
132
[ ...repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] ) , [ 'name' , 'string' ] ] ,
133
- repeat ( args . length , [ 'handler' , 'function' ] )
133
+ repeat ( Math . max ( 1 , args . length - 1 ) , [ 'handler' , 'function' ] )
134
134
) ;
135
135
const path = argv . path ;
136
136
const handler = argv . handler ;
0 commit comments