Closed
Description
Your system information
- VelocityJS version: 2.0.2
- Browser:
firefox 59.0.2 64-bit
chrome 66.0.3359.139 64-bit - Operating System: Arch linux
Checklist
- Is this an issue with code?: Yes
- Is this an issue with documentation?: No
- Have you reproduced this in other browsers?: only firefox and chrome, didn't try others
- Have you checked for updates?: Using latest 2.x
- Have you checked for similar open issues?: Yes
Please remember that this is an issue tracker, support requests should be posted on StackOverflow - see CONTRIBUTING.md
Please describe your issue in as much detail as possible:
Describe what you expected should happen and what did happen.
Expected: I expected to use Promise.all(arrayOfAnimations)
without issue.
Actual: Browser freezes
Steps for reproducing this issue (code):
Here is a minimal jsfiddle for reproducing the bug
Below is the vue code I used to understand the issue a little better
- https://codesandbox.io/s/0472r20wjw
- click
[Good Animate]
to see the expected behavior - click
[Buggy Animate]
to freeze your browser
The difference between Good
and Buggy
is that Good calls then
on each animation before passing it through Promise.all
. I believe the issue has to do with the promise implementation - for some reason in 2.x the promises are really arrays which Promise.all doesn't play well with.