bendc / animateplus

A+ animation module for the modern web
MIT License
5.96k stars 279 forks source link

Uncaught TypeError: Cannot read property 'forEach' of undefined #34

Closed davidmerrique closed 6 years ago

davidmerrique commented 6 years ago

Hi. These are some smooth animations.

I just discovered a bug.

If you load a page in the background (You can try it on any of the examples by going to a different tab and reloading the animation tab), an error is thrown because a property isn't set.

Checking for the existence of paused.all before calling all.forEach fixes it.

https://github.com/bendc/animateplus/blob/c2eff0ff45663b4c91a78aec0b176b52f8755f5d/animateplus.js#L316

Thanks!

bendc commented 6 years ago

Good catch, will fix. Thanks!

bendc commented 6 years ago

Fixed -- sorry for the delay!