Closed gaenglish closed 5 years ago
Not enough information, the code required
I resolved this issue by deep cloning my object before calling editor.fromJSON(data)
In my case, I'm selecting saved data from an NgRx store to set up my editor.
The data can be cloned like so:
editor.fromJSON({id: template.id, nodes: JSON.parse(JSON.stringify(template.nodes))});
I am building a system where we can create, save and load node data and I'm running into issue when using editor.fromJSON.
Using the Angular 8 example as a starting point, I get an error when trying to set a value in the number input component :
NumberComponent.html:1 ERROR TypeError: Cannot add property num, object is not extensible
Again, this only happens if I use editor.fromJSON().