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

Prevent error when response is null #1699

Merged
merged 1 commit into from Jan 23, 2023
Merged

Conversation

labnol
Copy link

@labnol labnol commented Jan 16, 2023

Purpose

Fix for this error.
TypeError: Cannot read properties of null (reading 'body')

Changes

Check if body exist

Additional information


  • I updated readme
  • I added unit test(s)

Fix for this error.

TypeError: Cannot read properties of null (reading 'body')
@labnol
Copy link
Author

labnol commented Jan 16, 2023

Could be related to #1574

@jimmywarting
Copy link
Collaborator

is there a problem with v3.2.5?

@roptch
Copy link

roptch commented Jan 16, 2023

Related to: #1701

Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

Nice catch 👍

@NewEraCracker
Copy link

Can someone please merge this and release 2.6.9 on npm with this fix.

Would close #1700 and #1701

@jimmywarting jimmywarting merged commit 0f1ebb0 into node-fetch:2.x Jan 23, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.6.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants