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');