BUG: Error when navigating out from Grapes with something selected.
Question
Hey @artf,
Steps:
Open Canvas with GrapesJS, select any of the components, then click on Go to Random, I get an error that says "Cannot read property 'models' of undefined".
This only happens if I call the editor.destroy() before navigating to a different page. But if I remove the destroy, it works fine...
Demo: https://stackblitz.com/edit/grapesjs-models
Should I really call the destroy()? Will I have any issue on opening GrapesJS multiples times if I don't destroy it?
Answers (2)
Thanks @cartifon should be fixed in the next release
Hello, I have the same problem now that I moved to latest version. Should I call editor.destroy()?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1520
[Bug] On this.components() Error : Uncaught TypeError: Cannot read property 'each' of undefined
Get below error for this.components() not sure if it is bug or I am doing something wrong. Uncaught TypeError: Cannot read property 'each'...
Issue #2498
[Bug] Error when trying to move cell from row.
Bug #2478 after release still exists. Repeat steps and you will get error Uncaught TypeError: Cannot read property 'indexEl' of undefined....
Issue #5378
BUG: Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #2328
Cannot read property 'hasFocus' of null
Hey @artf I get the error Cannot read property 'hasFocus' of null when i press 'a', 's', 'd' and 'w' from the keyboard on input text compon...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.