atomic children removal

This commit is contained in:
pooya parsa 2019-04-24 20:43:59 +04:30
parent 89f7287356
commit a354d9761f
1 changed files with 1 additions and 4 deletions

View File

@ -5,10 +5,7 @@ export function clearRequireCache(id) {
} }
if (entry.parent) { if (entry.parent) {
const i = entry.parent.children.findIndex(e => e.id === id) entry.parent.children = entry.parent.children.filter(e => e.id !== id)
if (i > -1) {
entry.parent.children.splice(i, 1)
}
} }
for (const child of entry.children) { for (const child of entry.children) {