-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
fix: warn for non serializable data instead of Error #4046
Conversation
@aldarund need to fix the tests. |
We should consider adding test sets for the states. |
Codecov Report
@@ Coverage Diff @@
## dev #4046 +/- ##
=======================================
Coverage 97.24% 97.24%
=======================================
Files 18 18
Lines 1272 1272
Branches 351 351
=======================================
Hits 1237 1237
Misses 33 33
Partials 2 2
Continue to review full report at Codecov.
|
# Conflicts: # yarn.lock
# Conflicts: # package.json # packages/nuxt-legacy/package.json # yarn.lock
The extract-css test has been changed, I think you can just revert it, then we can merge this pr 😎 |
# Conflicts: # test/unit/extract-css.test.js
@clarkdo merged latest dev, should be fine now |
On it |
Thanks |
For me this change still breaks export default {
asyncData: async ({ error, app, params }) => {
let client = app.apolloProvider.defaultClient
if (!params.slug) {
return error({ statusCode: 404, message: "Not found" })
}
const { data } = await client.query({
query: itemBySlugQuery,
variables: { slug: params.slug },
})
if (!data.itemBySlug) {
return error({ statusCode: 404, message: "Not found" })
}
console.log(Object.getOwnPropertySymbols(data.itemBySlug))
// => logs [ Symbol(id) ]
return Object.assign({}, { track: data.itemBySlug })
// doesn't convert the symbol => TypeError: Cannot convert a Symbol value to a string
},
}
Let me know if you need a reproduction repo to dig deeper or if this issue should be filed against vue-apollo. |
Same error as before, when using asyncData:
Am I missing something |
@davision from your changelog u are using original devalue lib. Are u on nuxt 2.2 ? Delete node modules and lock file and reinstall then. |
@sh reproduction repo would help |
@sh actually found a problem, will fix asap |
I am on 2.2 yes, also deleted node_modules completely and reinstall. Will check again with new PR! |
@davision Be aware that there was no release yet, so you have to test it "manually". |
@aldarund awesome, thanks :) I've pulled your changes from nuxt-contrib/devalue#3 and can confirm it's fixed for me! |
@aldarund I think we should do a minor release 🤔 |
@manniL ye, i planned to do it today :) |
Which version is it? with 1.0.4 there is still the same error. |
@davision There is no The change is included in Nuxt 2.2.0 |
I've tried reinstalling everything once again, and finally, it works! Thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Types of changes
Description
Resolves #4026
Will warn and skip instead of error
nuxt-contrib/devalue#1 related PR in fork
Checklist: