Closed ArturBaybulatov closed 4 years ago
Hello,
What version of immer are you using ? I can't reproduce the exception with the latest version, but the return value of produce() is null
: https://codesandbox.io/s/amazing-feistel-w8yg1
I'm not familiar with immer but it looks like a bug. I just don't know what operation immer is doing on the object to get to this result
Latest versions of both: objectmodel 4.0.6, immer 6.0.1. The error is visible, when the code is run in a browser console. Although, looks like it's only a warning, since it doesn't stop the execution.
Actually, I've created this issue, because I had a different error in my project code, which is relatied to objectmodel and immer. The original error was the following:
My code was the following:
For now, I've worked around the problem, configuring immer to disable auto freezing:
import {setAutoFreeze} from 'immer';
setAutoFreeze(false);
I'm gonna close the issue, since the original problem turned out to be just a warning, and not a real error. Thanks!
Okay, if you have more details about the specific operations done on model instances that give unexpected results, please keep me informed :+1:
When objectmodel used in conjunction with immer, the following error comes up: