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;