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

JSON.stringify on computed gives error about cyclic value #5426

Closed
henribru opened this issue Feb 14, 2022 · 1 comment
Closed

JSON.stringify on computed gives error about cyclic value #5426

henribru opened this issue Feb 14, 2022 · 1 comment

Comments

@henribru
Copy link

Version

3.2.31

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Call JSON.stringify on any computed (without .value)

What is expected?

Not actually sure if this should be expected to work or not ...

What is actually happening?

You get "TypeError: cyclic object value" (Firefox)/"TypeError: Converting circular structure to JSON" (Chrome)


Seems similar to #1916, but affects recent Chrome/Firefox on PC

@LinusBorg
Copy link
Member

Yeah well, it's never a good idea to pass a complex/stateful object to stringify.

I would not cosndier this a bug. You want to stringify the value, not the computed itself.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants