This commit is contained in:
yumoqing 2025-09-12 15:11:23 +08:00
parent 87f99b35dd
commit 5d7dc25a2b

View File

@ -45,9 +45,11 @@ bricks.Wterm = class extends bricks.JsWidget {
destroy(){ destroy(){
console.debug('------domoff event, destory this widget'); console.debug('------domoff event, destory this widget');
try { try {
this.unbind('element_resize', this.term_resize.bind(this)) if (this.heartbeat_task){
this.heartbeat_task.cancel(); this.heartbeat_task.cancel();
this.heartbeat_task = null; this.heartbeat_task = null;
}
this.unbind('element_resize', this.term_resize.bind(this))
} catch(e) { } catch(e) {
console.log('error ', e); console.log('error ', e);
} }