From cc955f22b49349b1821d468a16fbc74ffc3153e9 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 26 Sep 2019 08:25:27 +0200 Subject: [PATCH] Update ComponentDelete command --- src/commands/view/ComponentDelete.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/commands/view/ComponentDelete.js b/src/commands/view/ComponentDelete.js index ab9a7c286..f8fba0d4f 100644 --- a/src/commands/view/ComponentDelete.js +++ b/src/commands/view/ComponentDelete.js @@ -11,14 +11,11 @@ export default { components.forEach(component => { if (!component || !component.get('removable')) { - console.warn('The element is not removable', component); - return; - } - if (component) { - const coll = component.collection; - component.trigger('component:destroy'); - coll && coll.remove(component); + return this.em.logWarning('The element is not removable', { + component + }); } + component.remove(); }); return components;