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

Broken animation finishing after unmounting #12

Closed
xStrom opened this issue Feb 4, 2017 · 0 comments
Closed

Broken animation finishing after unmounting #12

xStrom opened this issue Feb 4, 2017 · 0 comments

Comments

@xStrom
Copy link

xStrom commented Feb 4, 2017

If ReactTransitionGroup is unmounted before all its animations have finished a javascript error is thrown complaining about reading properties of undefined.

Specifically the callbacks _handleDoneAppearing, _handleDoneEntering, _handleDoneLeaving have:

let component = this.childRefs[key];
// The following line (and its analogues) will throw with:
// Uncaught TypeError: Cannot read property 'componentDidLeave' of undefined
if (component.componentDidLeave) {

This bug is especially common with long running animations, however it can also happen with short animations if the timing is right.

@xStrom xStrom closed this as completed Feb 9, 2017
jony89 added a commit to jony89/react-transition-group that referenced this issue Jan 27, 2018
fixes reactjs#12 using reactjs#15 for v1 as well.

Not all of us has been moved to v2 (especially those of us who are still using `material-ui`  < v1-beta),
Yet, this is critical bug fix .

hopefully a version with that fix will be released soon ? :)
jquense pushed a commit that referenced this issue Jan 29, 2018
* Fix TransitionGroup error for v1 as well

fixes #12 using #15 for v1 as well.

Not all of us has been moved to v2 (especially those of us who are still using `material-ui`  < v1-beta),
Yet, this is critical bug fix .

hopefully a version with that fix will be released soon ? :)

* Update TransitionGroup.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant