Skip to content

Commit

Permalink
remove check for params in middlewarePipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
garethredfern committed Jan 31, 2021
1 parent 3ed40a3 commit 9b3f598
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/router/middlewarePipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ export default function middlewarePipeline(context, middleware, index) {
if (!nextMiddleware) {
return context.next;
}
return (params) => {
if (params) {
return context.next(params);
}
return () => {
nextMiddleware({
...context,
next: middlewarePipeline(context, middleware, index + 1),
Expand Down

0 comments on commit 9b3f598

Please sign in to comment.