Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:apertureless/vue-chartjs into de…
Browse files Browse the repository at this point in the history
…velop

* 'develop' of github.com:apertureless/vue-chartjs:
  Fix beforeDestory when renderChart was not called
  • Loading branch information
apertureless committed Jul 4, 2017
2 parents 7f62914 + 677c53d commit b23ce23
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/BaseCharts/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Doughnut.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/HorizontalBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/PolarArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})
4 changes: 3 additions & 1 deletion src/BaseCharts/Scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export default Vue.extend({
}
},
beforeDestroy () {
this._chart.destroy()
if (this._chart) {
this._chart.destroy()
}
}
})

0 comments on commit b23ce23

Please sign in to comment.