Skip to content

Commit

Permalink
Revert changes to Next.js itself
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 19, 2024
1 parent 07e35f2 commit 12214b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/next/src/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,9 @@ export async function isPageStatic({
useCache: true,
distDir,
})
const mod =
const mod = (
await runtime.context._ENTRIES[`middleware_${edgeInfo.name}`]
.ComponentMod
).ComponentMod

// This is not needed during require.
const buildManifest = {} as BuildManifest
Expand Down
5 changes: 3 additions & 2 deletions packages/next/src/server/web/sandbox/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ export const run = withTaggedErrors(async function runWithTaggedErrors(params) {

const edgeFunction: (args: {
request: RequestData
}) => Promise<FetchEventResult> =
await runtime.context._ENTRIES[`middleware_${params.name}`].default
}) => Promise<FetchEventResult> = (
await runtime.context._ENTRIES[`middleware_${params.name}`]
).default

const cloned = !['HEAD', 'GET'].includes(params.request.method)
? params.request.body?.cloneBodyStream()
Expand Down

0 comments on commit 12214b5

Please sign in to comment.