* Fix ReactJS TypeError, Issue #323 * style: space after `if` * style: space after `if` Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
parent
8bd53191b0
commit
dadecb296e
@ -82,15 +82,19 @@ function animateSVG(svgContainer, elements) {
|
||||
|
||||
newElements.push(newElement);
|
||||
animElements.push([animElement, parent]);
|
||||
|
||||
parent.replaceChild(animElement, unit);
|
||||
|
||||
if (parent) {
|
||||
parent.replaceChild(animElement, unit);
|
||||
}
|
||||
});
|
||||
|
||||
let animSvg = svgContainer.cloneNode(true);
|
||||
|
||||
animElements.map((animElement, i) => {
|
||||
animElement[1].replaceChild(newElements[i], animElement[0]);
|
||||
elements[i][0] = newElements[i];
|
||||
if (animElement[1]) {
|
||||
animElement[1].replaceChild(newElements[i], animElement[0]);
|
||||
elements[i][0] = newElements[i];
|
||||
}
|
||||
});
|
||||
|
||||
return animSvg;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user