Skip to content

Commit 8b98e78

Browse files
authored
Ensure ECharts does not error if chart has already been destroyed (#8168)
1 parent 7192eec commit 8b98e78

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

panel/models/echarts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export class EChartsView extends HTMLBoxView {
5757

5858
override render(): void {
5959
if (this._chart != null) {
60-
(window as any).echarts.dispose(this._chart)
60+
try {
61+
(window as any).echarts.dispose(this._chart)
62+
} catch (e) {}
6163
}
6264
super.render()
6365
this.container = div({style: {height: "100%", width: "100%"}})

0 commit comments

Comments
 (0)