Fix incorrect flow-through if-else case

This commit is contained in:
Garrett Mills 2022-04-05 10:37:03 -05:00
parent 5fa4f614e2
commit 7914a8f12e
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.9.26", "version": "0.9.27",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -323,9 +323,10 @@ export class Route<TReturn extends ResponseObject, THandlerParams extends unknow
if ( handler.prototype instanceof ParameterMiddleware ) { if ( handler.prototype instanceof ParameterMiddleware ) {
route.parameters.push(req => req.make<ParameterMiddleware<T, THandlerArgs>>(handler, req).handle(...handlerArgs)) route.parameters.push(req => req.make<ParameterMiddleware<T, THandlerArgs>>(handler, req).handle(...handlerArgs))
} else {
route.parameters.push(handler as ParameterProvidingMiddleware<T>)
} }
route.parameters.push(handler as ParameterProvidingMiddleware<T>)
return route return route
} }