Skip to content

Commit 0a1cfe7

Browse files
committed
fix request types
1 parent fa1128a commit 0a1cfe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/start/src/runtime/server-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ async function handleServerFunction(h3Event: HTTPEvent) {
128128
// This should never be the case in "proper" Nitro presets since node.req has to be IncomingMessage,
129129
// But the new azure-functions preset for some reason uses a ReadableStream in node.req (#1521)
130130
const isReadableStream = h3Request instanceof ReadableStream;
131-
const hasReadableStream = h3Request.body instanceof ReadableStream;
131+
const hasReadableStream = (h3Request as EdgeIncomingMessage).body instanceof ReadableStream;
132132
const isH3EventBodyStreamLocked =
133-
(isReadableStream && h3Request.locked) || (hasReadableStream && h3Request.body.locked);
133+
(isReadableStream && h3Request.locked) || (hasReadableStream && ((h3Request as EdgeIncomingMessage).body as ReadableStream).locked);
134134
const requestBody = isReadableStream ? h3Request : h3Request.body;
135135

136136
if (

0 commit comments

Comments
 (0)