fix(animations): ensure all elements are cleaned up when calling .destroy() (#19654)

* fix race condition

* remove zero
This commit is contained in:
Liam DeBeasi
2019-10-14 14:18:29 -04:00
committed by GitHub
parent 91008ac9a4
commit 2f882373bf

View File

@ -128,8 +128,10 @@ export const createAnimation = (): Animation => {
webAnimations.length = 0;
} else {
const elementsArray = elements.slice();
raf(() => {
elements.forEach(element => {
elementsArray.forEach(element => {
removeStyleProperty(element, 'animation-name');
removeStyleProperty(element, 'animation-duration');
removeStyleProperty(element, 'animation-timing-function');