-
Notifications
You must be signed in to change notification settings - Fork 257
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
getPost From DAta Undefined #12
Comments
I didnt have the exact same error , but maybe it helps, This what ended worked for me for some reason Also replacing |
@asinorum That got rid of the error but now it gets stuck on Loading.... it never gets past the (!data.getPost) |
same to me, |
So annoying, i've tried everithing tha crossed mi mind, but it stills throw me the data undefined error |
Hello @ArielPenna 🚀, have you tried to do the following changes: From:
To:
Hope that helped you, let me know if it works! |
@mariusflorescu if I remove (!thisPost) I get: TypeError: Cannot destructure property 'id' of 'thisPost' as it is undefined. if (thisPost) { Loading post.. 26 | } else {
Any ideas are appreciated |
Thanks @mariusflorescu this just work fine, i've tried it before I think, but didn't work. |
@likwid23 try like this, it's working for me let postMarkup; Loading post.. ;} else { const { id, body, createdAt, username, comments, likes, likeCount, commentCount } = thisPost; |
@ArielPenna I'm glad it worked. |
I think the problem might be in the destructoring? according to the error "data " is undefined
The text was updated successfully, but these errors were encountered: