From 1fed8e7c2fc25dc9433817e08f9500326c7672e1 Mon Sep 17 00:00:00 2001 From: Jakub Juszczak Date: Mon, 9 Apr 2018 14:02:46 +0200 Subject: [PATCH] fix(mixins): Add condition to check if chart instance is present. --- src/mixins/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mixins/index.js b/src/mixins/index.js index 8555d523..a1863d63 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -51,7 +51,9 @@ function dataHandler (newData, oldData) { } chart.update() } else { - chart.destroy() + if (chart) { + chart.destroy() + } this.renderChart(this.chartData, this.options) } } else {