From 7a048a07df0bc435767124e61b1a626996ceb1eb Mon Sep 17 00:00:00 2001 From: Jakub Juszczak Date: Sun, 2 Jul 2017 16:02:10 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20#122=20reactive=20mixin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reactive mixin broke if the initial data was set to null. --- src/mixins/reactiveData.js | 2 ++ src/mixins/reactiveProp.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/mixins/reactiveData.js b/src/mixins/reactiveData.js index 3b0df55d..b15b49bc 100644 --- a/src/mixins/reactiveData.js +++ b/src/mixins/reactiveData.js @@ -54,6 +54,8 @@ module.exports = { chart.destroy() this.renderChart(this.chartData, this.options) } + } else { + this.renderChart(this.chartData, this.options) } } } diff --git a/src/mixins/reactiveProp.js b/src/mixins/reactiveProp.js index 059ebbee..c9da8ff3 100644 --- a/src/mixins/reactiveProp.js +++ b/src/mixins/reactiveProp.js @@ -54,6 +54,8 @@ module.exports = { chart.destroy() this.renderChart(this.chartData, this.options) } + } else { + this.renderChart(this.chartData, this.options) } } }