fix: g2报错

This commit is contained in:
dataeaseShu 2023-07-06 09:58:08 +08:00
parent afb785d4ab
commit cfcb5c5df4

View File

@ -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?.()