Skip to content

Commit

Permalink
fix: use the same id for importing and checking error (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Mar 13, 2023
1 parent 68f5e82 commit 62e2efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime/src/templates/edge/next-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const handler = async (req, context) => {
try {
// We need to cache-bust the import because otherwise it will claim it
// doesn't exist if the user creates it after the server starts
const nextMiddleware = await import(`../../middleware.js#${idx++}`)
const nextMiddleware = await import(`../../middleware.js#${++idx}`)
middleware = nextMiddleware.middleware
} catch (importError) {
// Error message is `Module not found "file://<path>/middleware.js#123456".` in Deno
Expand Down

0 comments on commit 62e2efe

Please sign in to comment.