Browse Source
Merge pull request #2994 from jcamejo/remove-children-validation Fixes #2940
Remove children validation
pull/3024/head
Artur Arseniev
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
1 deletions
-
src/dom_components/model/Components.js
|
|
|
@ -22,11 +22,17 @@ export default Backbone.Collection.extend({ |
|
|
|
}, |
|
|
|
|
|
|
|
removeChildren(removed, coll, opts = {}) { |
|
|
|
// Removing a parent component can cause this function
|
|
|
|
// to be called with an already removed child element
|
|
|
|
if (!removed) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const { domc, em } = this; |
|
|
|
const allByID = domc ? domc.allById() : {}; |
|
|
|
|
|
|
|
if (!opts.temporary) { |
|
|
|
// Remove the component from the gloabl list
|
|
|
|
// Remove the component from the global list
|
|
|
|
const id = removed.getId(); |
|
|
|
const sels = em.get('SelectorManager').getAll(); |
|
|
|
const rules = em.get('CssComposer').getAll(); |
|
|
|
|