Skip to content

Commit

Permalink
fix: include all middleware in handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 25, 2023
1 parent 2c52c62 commit 8e66f14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export async function scanHandlers(nitro: Nitro) {
.flatMap((h) => h.handlers)
.filter((h, index, array) => {
return (
h.middleware ||
array.findIndex(
(h2) => h.route === h2.route && h.method === h2.method
) === index
Expand Down

0 comments on commit 8e66f14

Please sign in to comment.