diff --git a/src/BaseCharts/Bar.js b/src/BaseCharts/Bar.js index 7ccab317..db91474e 100644 --- a/src/BaseCharts/Bar.js +++ b/src/BaseCharts/Bar.js @@ -79,6 +79,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Bubble.js b/src/BaseCharts/Bubble.js index d7f096d6..50279ba7 100644 --- a/src/BaseCharts/Bubble.js +++ b/src/BaseCharts/Bubble.js @@ -80,6 +80,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Doughnut.js b/src/BaseCharts/Doughnut.js index 0dd3fd04..0df50c9d 100644 --- a/src/BaseCharts/Doughnut.js +++ b/src/BaseCharts/Doughnut.js @@ -63,6 +63,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/HorizontalBar.js b/src/BaseCharts/HorizontalBar.js index 9a860e50..422437bc 100644 --- a/src/BaseCharts/HorizontalBar.js +++ b/src/BaseCharts/HorizontalBar.js @@ -79,6 +79,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Line.js b/src/BaseCharts/Line.js index fd922b3f..cc54fb39 100644 --- a/src/BaseCharts/Line.js +++ b/src/BaseCharts/Line.js @@ -78,6 +78,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Pie.js b/src/BaseCharts/Pie.js index ad07eed0..2d6b2b33 100644 --- a/src/BaseCharts/Pie.js +++ b/src/BaseCharts/Pie.js @@ -63,6 +63,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/PolarArea.js b/src/BaseCharts/PolarArea.js index 11b580a8..cac465dc 100644 --- a/src/BaseCharts/PolarArea.js +++ b/src/BaseCharts/PolarArea.js @@ -63,6 +63,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Radar.js b/src/BaseCharts/Radar.js index 2e6fa39f..eaddf7d6 100644 --- a/src/BaseCharts/Radar.js +++ b/src/BaseCharts/Radar.js @@ -63,6 +63,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } }) diff --git a/src/BaseCharts/Scatter.js b/src/BaseCharts/Scatter.js index 3167bb4b..c7ad0c38 100644 --- a/src/BaseCharts/Scatter.js +++ b/src/BaseCharts/Scatter.js @@ -69,6 +69,8 @@ export default Vue.extend({ } }, beforeDestroy () { - this._chart.destroy() + if (this._chart) { + this._chart.destroy() + } } })