Can't use structuredClone from a store state property #1412
Unanswered
sergiomartindev
asked this question in
Help and Questions
Replies: 1 comment
-
The error looks like you have a property in your state that contains the global window object. What did you store in your state? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to create a deep clone (via the global structuredClone method) of an array stored in a store' state; but it throws the following error:
I'm aware that it might be caused by the own behavior of the structuredClone method, which doesn't support proxies. So my question is, is there any alternative way to tackle this problem?
I've used the toRaw method, which seems to be valid, so the result looks this way:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions