|
|
|
@ -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; |
|
|
|
|