Fix incorrect flow-through if-else case

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

View File

@@ -323,9 +323,10 @@ export class Route<TReturn extends ResponseObject, THandlerParams extends unknow
if ( handler.prototype instanceof ParameterMiddleware ) {
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
}