Comparing version 0.0.10 to 0.0.11
@@ -148,9 +148,17 @@ /* eslint-disable no-prototype-builtins */ | ||
targetToDestroy.dependencies.clear(); | ||
targetToDestroy.children.forEach((child) => child.destroy()); | ||
if (targetToDestroy.parent) { | ||
const thisIndexInParent = targetToDestroy.parent.children.indexOf(this); | ||
if (thisIndexInParent !== -1) { | ||
targetToDestroy.parent.children.splice(thisIndexInParent, 1); | ||
while (targetToDestroy && targetToDestroy.dependencies.size === 0) { | ||
targetToDestroy.children.forEach((child) => child.destroy()); | ||
if (targetToDestroy.parent) { | ||
const thisIndexInParent = targetToDestroy.parent.children.indexOf(this); | ||
if (thisIndexInParent !== -1) { | ||
targetToDestroy.parent.children.splice(thisIndexInParent, 1); | ||
} | ||
if (targetToDestroy.parent !== rootContainer) { | ||
targetToDestroy = targetToDestroy.parent; | ||
} | ||
delete targetToDestroy.parent; | ||
} | ||
delete targetToDestroy.parent; | ||
else { | ||
targetToDestroy = null; | ||
} | ||
} | ||
@@ -157,0 +165,0 @@ } |
{ | ||
"name": "mobidic", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"keywords": [], | ||
@@ -5,0 +5,0 @@ "author": "js2me", |
Sorry, the diff of this file is not supported yet
26926
474