We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
status
statusText
1 parent 53aed97 commit 38a0191Copy full SHA for 38a0191
src/handler.ts
@@ -125,8 +125,8 @@ function isResponse(val: unknown): val is Response {
125
126
// Make sure the contents of init match ResponseInit
127
const init = val[1];
128
- if (typeof init.status !== 'number') return false;
129
- if (typeof init.statusText !== 'string') return false;
+ if (init.status && typeof init.status !== 'number') return false;
+ if (init.statusText && typeof init.statusText !== 'string') return false;
130
if (init.headers && !isObject(init.headers)) return false;
131
132
return true;
0 commit comments