Fix incorrect flow-through if-else case
This commit is contained in:
parent
5fa4f614e2
commit
7914a8f12e
@ -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",
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user