Skip to content

Commit

Permalink
fix(mixins): Add condition to check if chart instance is present.
Browse files Browse the repository at this point in the history
  • Loading branch information
apertureless committed Apr 9, 2018
1 parent fb8cb9f commit 1fed8e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mixins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function dataHandler (newData, oldData) {
}
chart.update()
} else {
chart.destroy()
if (chart) {
chart.destroy()
}
this.renderChart(this.chartData, this.options)
}
} else {
Expand Down

0 comments on commit 1fed8e7

Please sign in to comment.