Skip to content

fix: Protect against unmounting#3

Open
dignifiedquire wants to merge 1 commit intomzabriskie:masterfrom
codio:master
Open

fix: Protect against unmounting#3
dignifiedquire wants to merge 1 commit intomzabriskie:masterfrom
codio:master

Conversation

@dignifiedquire
Copy link
Copy Markdown

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
Copy Markdown

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