Skip to content

Allow undefined Response status - #534

Merged
mislav merged 2 commits into
JakeChampion:masterfrom
remcohaszing:response-undefined-status
Jun 19, 2017
Merged

mislav merged 2 commits into
JakeChampion:masterfrom
remcohaszing:response-undefined-status

Conversation

@remcohaszing

Copy link
Copy Markdown
Contributor

This allows the Response constructor to accept a status code that's
explicitly set to undefined. Native fetch implementations in Chrome and
Firefox behave this way.

The following now works, but would previously throw an error:

new Response('', { status: undefined })

This allows the Response constructor to accept a status code that's
explicitly set to undefined. Native fetch implementations in Chrome and
Firefox behave this way.

The following now works, but would previously throw an error:

    new Response('', { status: undefined })

@mislav mislav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Would you please add a test for the new behavior?

@mislav
mislav merged commit 27473e9 into JakeChampion:master Jun 19, 2017
@mislav

mislav commented Jun 19, 2017

Copy link
Copy Markdown
Contributor

Thank you!

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants