From 62cf2c2bffc8d2a7eb2622b373a914f931d46e8d Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 12 Sep 2025 12:19:06 +0800 Subject: [PATCH] bugfix --- bricks/wterm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bricks/wterm.js b/bricks/wterm.js index f7cc504..1621cc8 100644 --- a/bricks/wterm.js +++ b/bricks/wterm.js @@ -19,9 +19,13 @@ bricks.Wterm = class extends bricks.JsWidget { } destroy(){ console.debug('------domoff event, destory this widget'); + try { this.unbind('element_resize', this.term_resize.bind(this)) this.heartbeat_task.cancel(); this.heartbeat_task = null; + } catch(e) { + console.log('error ', e); + } console.debug('---1--domoff event, destory this widget'); if (this.socket){ console.log('socket alive, destroy it');