GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

BUG: Error when navigating out from Grapes with something selected. #2953

Closed cartifon closed 4 years ago

cartifon commented 4 years ago

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?

artf commented 4 years ago

Thanks @cartifon should be fixed in the next release

Nelida27 commented 3 years ago

Hello, I have the same problem now that I moved to latest version. Should I call editor.destroy()?