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

TypeError: Cannot read property 'map' of undefined #6

Open
aesimano opened this issue Jul 31, 2019 · 3 comments
Open

TypeError: Cannot read property 'map' of undefined #6

aesimano opened this issue Jul 31, 2019 · 3 comments

Comments

@aesimano
Copy link

When expanding a scream and clicking on like/unlike Comments.js errors:

image

The issue occurs because the liked/unliked scream returned does not include comments. Fix is in dataReducer.js LIKE_SCREAM/UNLIKE_SCREAM, to spread state.scream as follows:

if (state.scream.screamId === action.payload.screamId) {
  state.scream = { ...state.scream, ...action.payload };
}

I can submit a pull request if I can push my branch with the fix.

@AndrewYinLi
Copy link

You're my hero tbh

@sshah98
Copy link

sshah98 commented Apr 7, 2020

This is great! I looked through your own branch and you have some great fixes for other bugs with this code. Definitely recommend a pull request

@youzem
Copy link

youzem commented Jun 20, 2020

don't work for me bro plz can u help me

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

No branches or pull requests

4 participants