diff --git a/lib/core.js b/lib/core.js index b39d67b..feb75dc 100644 --- a/lib/core.js +++ b/lib/core.js @@ -35,7 +35,8 @@ module.exports = { classData.componentWillUnmount = function() { var chart = this.state.chart; - chart.destroy(); + if(chart) + chart.destroy(); }; classData.componentWillReceiveProps = function(nextProps) {