Skip to content

Commit 5850426

Browse files
committed
.
1 parent 6ce25be commit 5850426

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/next-on-pages/src/buildApplication/processVercelFunctions/dedupeEdgeFunctions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,13 @@ function fixFunctionContents(contents: string): string {
503503
// https://github.com/vercel/next.js/blob/9ec37c12/packages/next/src/compiled/react/cjs/react.react-server.production.js#L87
504504
contents = contents.replace(
505505
/([\w$]+) instanceof URL\?new Request\([\w$]+,([\w$]+)\):[\w$]+;/gm,
506-
`(() => {
506+
`(($1, $2) => {
507507
if ($1 instanceof URL) {
508508
const { cache, ...init } = $2 ?? {};
509509
return new Request($1, init);
510510
}
511511
return $1;
512-
})();`,
512+
})($1, $2);`,
513513
);
514514

515515
// TODO: Remove once https://github.com/vercel/next.js/issues/58265 is fixed.

0 commit comments

Comments
 (0)