Is it intended that the Promise object, which is returned by a Tween's .then() method, isn't terminated when the animation has been overwritten?
At first I planned on using it in combination with the async/await syntax, which sometimes resulted in a permanent halt of the respective function. (In my tests the status of the Promise remains "pending" after the animation has been overwritten.)
But even when I use it with a then-catch-structure, no clause is executed.
In the end I promisified the GSAP animations myself:
Is it intended that .then() is not terminated, when the animation has been overwritten?
in GSAP
Posted
Hello!
Is it intended that the Promise object, which is returned by a Tween's .then() method, isn't terminated when the animation has been overwritten?
At first I planned on using it in combination with the async/await syntax, which sometimes resulted in a permanent halt of the respective function. (In my tests the status of the Promise remains "pending" after the animation has been overwritten.)
But even when I use it with a then-catch-structure, no clause is executed.
In the end I promisified the GSAP animations myself:
I feel like this undermines the usefulness of the .then() method (at least for some usecases).
Have a good one!
See the Pen GRyeZKV by AFoeee (@AFoeee) on CodePen