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 problem when modal is destroyed but it still try close it #143

Merged
merged 2 commits into from Apr 18, 2018

Conversation

Projects
None yet
2 participants
@alimek
Copy link
Contributor

commented Apr 16, 2018

I got alert when component was already destroyed but it still tried to call this.contentRef[animationOut].

if (!this.contentRef) {
return;
}

this.contentRef[this.animationIn](this.props.animationInTiming).then(() => {

This comment has been minimized.

Copy link
@mmazzarolo

mmazzarolo Apr 18, 2018

Member

Could you please wrap the code below like this instead?

if (this.contentRef) {
  this.contentRef[this.animationIn](this.props.animationInTiming).then(() => {
  ...
}

Thanks!

This comment has been minimized.

Copy link
@alimek

alimek Apr 18, 2018

Author Contributor

done

@mmazzarolo

This comment has been minimized.

Copy link
Member

commented Apr 18, 2018

Thanks! Could you please refactor the check like in my comment? (for consistency)

@mmazzarolo mmazzarolo added the on hold label Apr 18, 2018

@alimek

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2018

@mmazzarolo done ;)

@mmazzarolo

This comment has been minimized.

Copy link
Member

commented Apr 18, 2018

Thanks!
Merged :)

@mmazzarolo mmazzarolo merged commit 175caa8 into react-native-community:master Apr 18, 2018

@mmazzarolo

This comment has been minimized.

Copy link
Member

commented May 1, 2018

Landed on v6.0.0 🔆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.