mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Merge pull request #291 from apertureless/feature/fix_reactive_mixins
fix(mixins): Check for chartjs instance before rendering chart
This commit is contained in:
@@ -63,6 +63,9 @@ module.exports = {
|
|||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (this.$data._chart) {
|
||||||
|
this.$data._chart.destroy()
|
||||||
|
}
|
||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ module.exports = {
|
|||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (this.$data._chart) {
|
||||||
|
this.$data._chart.destroy()
|
||||||
|
}
|
||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user