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

Checking if legend destroy exists before clearing a chart on unmount #78

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

Conversation

shivangkumar
Copy link

When component unmounts before chart is completely rendered, in some race scenarios the legend object does not contain the destroy method and thus fails. This commit helps prevent the unmounting from breaking.

@Pauan
Copy link
Collaborator

Pauan commented Aug 18, 2018

@shivangkumar Thanks a lot for that!

However, I don't think it's quite correct. Charts aren't required to have a legend, and if they don't have a legend then your code will cause them to never be cleaned up, ever.

I'll need to discuss this with the team to figure out the best way to fix this.

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