Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Animate.sequence restart issues #44031

Closed
wants to merge 1 commit into from

Conversation

asyler
Copy link
Contributor

@asyler asyler commented Apr 10, 2024

Summary:

Currently, if the Animated.sequence animation is finished, and then the start() method is called without a reset() method being invoked beforehand, the failure happens: undefined is not an object (evaluating 'animations[current].start').
Use cases:

  • sequence animation started, finished, and then started again
  • sequence animation is used in Animation.loop with resetBeforeIteration set to false, which essentially does the same as the previous case

Related issues:

Changelog:

[General] [Fixed] - Fix sequence restart failure

Test Plan:

Test cases are included: 1 for regression and 2 for mentioned use cases in the summary

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Apr 10, 2024
@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 28, 2024
@facebook-github-bot
Copy link
Contributor

@dmytrorykun merged this pull request in a93a15a.

Copy link

This pull request was successfully merged by @asyler in a93a15a.

When will my fix make it into a release? | How to file a pick request?

kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
Summary:
Currently, if the `Animated.sequence` animation is finished, and then the `start()` method is called without a `reset()` method being invoked beforehand, the failure happens: ```undefined is not an object (evaluating 'animations[current].start')```.
Use cases:
- sequence animation started, finished, and then started again
- sequence animation is used in `Animation.loop` with `resetBeforeIteration` set to `false`, which essentially does the same as the previous case

Related issues:
- facebook#43120
- facebook#37611

## Changelog:

[General] [Fixed] - Fix sequence restart failure

Pull Request resolved: facebook#44031

Test Plan: Test cases are included: 1 for regression and 2 for mentioned use cases in the summary

Reviewed By: cipolleschi

Differential Revision: D56015346

Pulled By: dmytrorykun

fbshipit-source-id: 8b0f46c8a33397fece807634463ce630c89d28af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants