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 #5378
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 #3575
grapes.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined
I got this error when add the <iframe src="https://app.conversiobot.com/boot/fvMEvO" width="100%" height="500" frameBorder="0" allow="geolo...
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....
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.