Issue #2953💬 AnsweredOpened August 11, 2020by cartifon0 reactions

Error when navigating out from Grapes with something selected.

Quick answerby artf

Thanks @cartifon should be fixed in the next release

Read full answer below ↓

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)

artfAugust 27, 2020

Thanks @cartifon should be fixed in the next release

Nelida27September 29, 2021

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.