-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pinia throws obj.hasOwnProperty is not a function when combined with apollo #2872
Comments
Seems to be related with #2837 |
Can you repro without Apollo? Where is an object with null as the prototype being passed to pinia? |
@posva this only happens with the apollo project sample. I am not sure how else I can reproduce the issue |
I have been able to reproduce it outside of Apollo project with the following
|
Yes, and my goal is to understand why such an object in included in pinia state by Apollo. |
I've investigated a bit and seems that's caused by how Apollo stores data in |
Also found this issue in the apollo-client repo apollographql/apollo-client#12199 |
having the same issue on my end, also using "@pinia/nuxt": "0.9.0" and "pinia": "2.3.0" + "@nuxtjs/apollo": "5.0.0-alpha.14 this was not the case with "@pinia/nuxt": "0.5.5" and "pinia": "2.2.5" |
Reproduction
https://github.com/kyurkchyan/pinia-apollo-pnpm
Steps to reproduce the bug
pnpm i
pnpm dev
obj.hasOwnProperty is not a function
Expected behavior
The app should load successfully
Actual behavior
App load fails with
obj.hasOwnProperty is not a function
errorAdditional information
If you switch to the without-pinia branch and try the same steps everything works
You don't even have to use any pinia store for this issue to happen. As soon as you install the pinia nuxt plugin everything breaks.
Further, if you downgrade the version of pinia to
0.5.5
everything starts working again. You can check that out inside the working-pinia branchI've tried all of the versions that were released after
0.5.5
none of them work.The text was updated successfully, but these errors were encountered: