From c63f9d8d592945464186702f6ce1d14812e33024 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 5 Jan 2025 14:53:21 +0100 Subject: [PATCH] fix: fix internal server error with Next.js 15.1 --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c7c2296..e32af26 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,11 @@ try { startServerSpan: undefined, experimentalHttpsServer: useHTTPS }); - handle = initResponse[0]; + if (initResponse.requestHandler) { + handle = initResponse.requestHandler; + } else { + handle = initResponse[0]; + } isPrepared = true; } catch (err) { nextError = err;