diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 705a2edcc..e4c8d330e 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -1699,7 +1699,9 @@ }, beforeDestroy() { this.clearChart(); - getChart(this.chartIndex).dispose(); + if(getChart(this.chartIndex)){ + getChart(this.chartIndex).dispose(); + } if(!document.onmousemove){// 移除鼠标移动事件监听 document.onmousemove=null; }