Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Check if scrollbar exists before calling destroy function #18

Merged
merged 1 commit into from Oct 26, 2017
Merged

Check if scrollbar exists before calling destroy function #18

merged 1 commit into from Oct 26, 2017

Conversation

ghost
Copy link

@ghost ghost commented Oct 26, 2017

In some cases componentWillUnmount is called without componentDidMount beforehand.

For example:

To be a bit more resilient is such cases I've added this workaround which checks if scrollbar was instantiated before calling it's destroy method.

This doesn't solve the underlying bugs which cause this wrong lifecycle-method calling but it means there isn't an exception from scrollbar in such cases.

@idiotWu idiotWu merged commit a7f70a6 into idiotWu:master Oct 26, 2017
@idiotWu
Copy link
Owner

idiotWu commented Oct 26, 2017

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant