Skip to content

Commit 7fcd156

Browse files
committed
fix(app): unwrap _request without in operator
1 parent 41dbfa8 commit 7fcd156

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/runtime/internal/app.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ function createNitroApp(): NitroApp {
125125
const nativeFetch = globalThis.fetch;
126126
globalThis.fetch = (input: RequestInfo | URL, init?: RequestInit) => {
127127
if (typeof input === "string" && input.charCodeAt(0) === 47 /* '/' */) {
128-
return request(input, init);
129-
}
130-
if ("_request" in (input as Request)) {
131-
input = (input as any)._request;
128+
return request(input, init); // local request
132129
}
130+
input = (input as any)._request || input; // unwrap srvx Request
133131
return nativeFetch(input, init);
134132
};
135133

0 commit comments

Comments
 (0)