Skip to content

Promise.all hangs #868

Closed
Closed
@olsonpm

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

  1. https://codesandbox.io/s/0472r20wjw
  2. click [Good Animate] to see the expected behavior
  3. 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.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions