Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Fix issue when componentWillUnmount() #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module.exports = {

classData.componentWillUnmount = function() {
var chart = this.state.chart;
chart.destroy();
if(chart)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the nitpick, but could you wrap this if statement with braces?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mloisotto Do you have an estimation on when you can get to this? I am currently being blocked by it. If you can't let me know and I can take over.

chart.destroy();
};

classData.componentWillReceiveProps = function(nextProps) {
Expand Down