Closed lveillard closed 7 months ago
Thanks for the effort of creating this PR! I think this might actually be a bug in the current current
(lol) implementation, as it is supposed to be able to handle recursion already by the looks of it: https://github.com/immerjs/immer/blob/main/src/core/current.ts#L33
From a quick scan your implementation seems also to be exactly the same as current
? Would you mind first setting up a unit test showing the problem in the existing current
implementation?
Thanks for the effort of creating this PR! I think this might actually be a bug in the current
current
(lol) implementation, as it is supposed to be able to handle recursion already by the looks of it: https://github.com/immerjs/immer/blob/main/src/core/current.ts#L33From a quick scan your implementation seems also to be exactly the same as
current
? Would you mind first setting up a unit test showing the problem in the existingcurrent
implementation?
True! Somehow deepCurrent works for my use case and current does not 🤷♂️. Will try to find some time to build that test triggering the issue, I guess is related to using symbols with objects as values.
Closing in favour of #1105, that fixes the underlying issue (I think). Thanks for reporting and taking the effort for this PR though!
Related to this issue: https://github.com/immerjs/immer/issues/1091
This is just a draft, if it goes validated I can test it, add some tests and apply any changes you might ask for!