You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I put a ReactNode inside craft.info and found that node.info is serialized into EditorState
So immer.js serializes it and caused an error when I hit "undo" after using "actions.replaceNode"(#571 (comment)) --> "Cannot add property validated, object is not extensible".
Do not serialize info into editor state. And use a getter in node to get the info.
Perhaps deprecate info? I know it's a big change. But info is just a map from component name to a record. craft.js core does not read it at all. The best way is to give up control totally. Issues like this will be out of scope Allowing type augmentation聽#678
Additional context
As described info is component level and should not be serialized #578
Is your feature request related to a problem? Please describe.
I put a ReactNode inside craft.info and found that node.info is serialized into EditorState
So immer.js serializes it and caused an error when I hit "undo" after using "actions.replaceNode"(#571 (comment)) --> "Cannot add property validated, object is not extensible".
The reason
https://stackoverflow.com/a/61345526/1922857
Describe the solution you'd like
Do not serialize info into editor state. And use a getter in node to get the info.
Perhaps deprecate info? I know it's a big change. But info is just a map from component name to a record. craft.js core does not read it at all. The best way is to give up control totally. Issues like this will be out of scope Allowing type augmentation聽#678
Additional context
As described info is component level and should not be serialized
#578