Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Fix remove() for TL children

Julian Garnier3a052f8506b6
diff --git a/anime.js b/anime.js
index fae2dc32..afd23787 100644
--- a/anime.js
+++ b/anime.js
@@ -968,7 +968,7 @@
const child = children[c];
const childAnimations = child.animations;
removeTargetsFromAnimations(targetsArray, childAnimations);
- if (!childAnimations.length && !child.children.length) children.splice(a, 1);
+ if (!childAnimations.length && !child.children.length) children.splice(c, 1);
}
if (!animations.length && !children.length) instance.pause();
}