Skip to content

Commit

Permalink
fix(handler): Response options status and statusText are optional
Browse files Browse the repository at this point in the history
Closes #133
  • Loading branch information
enisdenjo committed Nov 19, 2024
1 parent 53aed97 commit 38a0191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function isResponse(val: unknown): val is Response {

// Make sure the contents of init match ResponseInit
const init = val[1];
if (typeof init.status !== 'number') return false;
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;
if (init.headers && !isObject(init.headers)) return false;

return true;
Expand Down

0 comments on commit 38a0191

Please sign in to comment.