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: Protect against unmounting #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dignifiedquire
Copy link

When the component is unmounted due to a page transition
multiple errors occur (setState on unmounted component and
this.refs being empty).
This protects against that.

When the component is unmounted due to a page transition
multiple errors occur (`setState` on unmounted component and
`this.refs` being empty).
This protects against that.
@bobwhitelock
Copy link

I've encountered the same issue, in particular I get the following error logged in a page transition:

Uncaught TypeError: Cannot read property 'style' of undefined
    _hideFlippedSide @ FlipCard.js:198

This PR looks like it should fix this, unfortunately I wasn't able to get the updated code working within my project since as far as I can see there does not seem to be either a compiled ES5 version of it or steps/code to build this within the PR or main project. Any help with the correct way to build this would be appreciated.

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

Successfully merging this pull request may close these issues.

2 participants