Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow undefined Response status #534

Merged
merged 2 commits into from Jun 19, 2017
Merged

Allow undefined Response status #534

merged 2 commits into from Jun 19, 2017

Conversation

remcohaszing
Copy link
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 })
Copy link
Contributor

@mislav mislav left a comment

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
Copy link
Contributor

mislav commented Jun 19, 2017

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.

None yet

2 participants