Skip to content

Commit

Permalink
fix(scan): do not dedup middleware handlers (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jan 25, 2023
1 parent 2c52c62 commit 153f286
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 153f286

Please sign in to comment.