Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(kit): normalize handler paths (#8626)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 3, 2022
1 parent d8c41e1 commit 7c4899a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/kit/src/nitro.ts
@@ -1,4 +1,5 @@
import type { NitroEventHandler, NitroDevEventHandler, Nitro } from 'nitropack'
import { normalize } from 'pathe'
import { useNuxt } from './context'

/**
Expand All @@ -10,7 +11,8 @@ function normalizeHandlerMethod (handler: NitroEventHandler) {
const [, method = undefined] = handler.handler.match(/\.(get|head|patch|post|put|delete|connect|options|trace)(\.\w+)*$/) || []
return {
method,
...handler
...handler,
handler: normalize(handler.handler)
}
}

Expand Down

0 comments on commit 7c4899a

Please sign in to comment.