From 5850426d4c13f16aa8758d274ca960de6f87201d Mon Sep 17 00:00:00 2001 From: James Date: Mon, 13 May 2024 18:05:58 +0100 Subject: [PATCH] . --- .../processVercelFunctions/dedupeEdgeFunctions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-on-pages/src/buildApplication/processVercelFunctions/dedupeEdgeFunctions.ts b/packages/next-on-pages/src/buildApplication/processVercelFunctions/dedupeEdgeFunctions.ts index 14b204910..806a40ff1 100644 --- a/packages/next-on-pages/src/buildApplication/processVercelFunctions/dedupeEdgeFunctions.ts +++ b/packages/next-on-pages/src/buildApplication/processVercelFunctions/dedupeEdgeFunctions.ts @@ -503,13 +503,13 @@ function fixFunctionContents(contents: string): string { // https://github.com/vercel/next.js/blob/9ec37c12/packages/next/src/compiled/react/cjs/react.react-server.production.js#L87 contents = contents.replace( /([\w$]+) instanceof URL\?new Request\([\w$]+,([\w$]+)\):[\w$]+;/gm, - `(() => { + `(($1, $2) => { if ($1 instanceof URL) { const { cache, ...init } = $2 ?? {}; return new Request($1, init); } return $1; - })();`, + })($1, $2);`, ); // TODO: Remove once https://github.com/vercel/next.js/issues/58265 is fixed.