From 771a788f44450d2e1968b063c2c319de60599d39 Mon Sep 17 00:00:00 2001 From: fscz Date: Sun, 22 May 2016 11:53:18 +0200 Subject: [PATCH] fix bug --- lib/core.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core.js b/lib/core.js index 3da694b..3c06eac 100644 --- a/lib/core.js +++ b/lib/core.js @@ -55,13 +55,16 @@ module.exports = { } else { // assign all of the properites from the next datasets to the current chart nextProps.data.datasets.forEach(function(set, setIndex) { - var chartDataset = chart.data.datasets[setIndex]; + + var chartDataset = {}; for (var property in set) { if (set.hasOwnProperty(property)) { chartDataset[property] = set[property]; } } + + chart.data.datasets[setIndex] = chartDataset; }); chart.data.labels = nextProps.data.labels;