diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index 60390d6e2a..086615a457 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -167,7 +167,9 @@ export default { }, beforeDestroy() { if (this.myChart.container) { - clear(this.myChart.container) + if (typeof this.myChart.container.getAttribute === 'function') { + clear(this.myChart.container) + } } this.myChart?.clear?.() this.myChart?.unbindSizeSensor?.()