Skip to content

Don't try to remove cruft if null #5

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

Merged
merged 1 commit into from
Jun 17, 2016
Merged

Conversation

tht13
Copy link
Contributor

@tht13 tht13 commented May 19, 2016

I have been getting a cannot get parent node of null error when unmounting the component. This PR will check if cruft is null before attempting to remove it.

@n1mmy
Copy link

n1mmy commented Jun 7, 2016

I think this happens when you have two charts on a page and you unmount them both.

@tht13
Copy link
Contributor Author

tht13 commented Jun 7, 2016

Yes, that is correct
But since react elements are not aware of other instances of themselves, I think this is the simplest way to fix the bug.

@n1mmy
Copy link

n1mmy commented Jun 8, 2016

Yup! I was hit by the exact same issue. I applied this patch to my local fork and it worked like a charm. Thanks @tht13 !

@benjeffery would be great to have an official release with this patch. Running from a git fork is annoying because of the pre-compilation.

@benjeffery
Copy link
Owner

I'm on paternity leave currently - will try to find a moment to merge this in the next few days.

@benjeffery benjeffery merged commit 9ce84d6 into benjeffery:master Jun 17, 2016
@benjeffery
Copy link
Owner

Released as v0.3.3. Thanks for reporting this. I'm still hoping for an upstream solution eventually!

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.

3 participants