From ff9d6c6b081d383b3210c5646acbb9acb2951db0 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 13 Apr 2020 23:19:45 +0200 Subject: [PATCH] Fix tests --- src/dom_components/model/Components.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom_components/model/Components.js b/src/dom_components/model/Components.js index 3e16914e7..de54866cd 100644 --- a/src/dom_components/model/Components.js +++ b/src/dom_components/model/Components.js @@ -23,7 +23,7 @@ export default Backbone.Collection.extend({ removeChildren(removed, coll, opts = {}) { const { domc, em } = this; - const allByID = domc.allById(); + const allByID = domc ? domc.allById() : {}; if (!opts.temporary) { // Remove the component from the gloabl list @@ -192,7 +192,7 @@ export default Backbone.Collection.extend({ const { domc, em } = this; const style = model.getStyle(); const avoidInline = em && em.getConfig('avoidInlineStyle'); - domc.Component.ensureInList(model); + domc && domc.Component.ensureInList(model); if ( !isEmpty(style) &&