diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index 5cd889028..bd444b142 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -763,7 +763,8 @@ export default Backbone.Model.extend({ BlockManager, CodeManager, Commands, - DeviceManager + DeviceManager, + I18n } = this.attributes; this.stopDefault(); DomComponents.destroy(); @@ -779,6 +780,7 @@ export default Backbone.Model.extend({ CodeManager.destroy(); Commands.destroy(); DeviceManager.destroy(); + I18n.destroy(); this.view.remove(); this.stopListening(); this.clear({ silent: true }); diff --git a/src/i18n/index.js b/src/i18n/index.js index 0225ea424..66a10ada2 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -242,6 +242,11 @@ export default () => { _debug(str, opts = {}) { const { em, config } = this; (opts.debug || config.debug) && em && em.logWarning(str); + }, + + destroy() { + this.config = config; + this.em = {}; } }; };