Commit 3085c5d4 authored by JC Brand's avatar JC Brand

Catch errors when `destroy` is called for already removed message

parent 84bde6e7
......@@ -87,7 +87,13 @@ converse.plugins.add('converse-chatboxes', {
this.on('change:put', this.uploadFile, this);
}
if (this.isOnlyChatStateNotification()) {
window.setTimeout(this.destroy.bind(this), 20000);
window.setTimeout(() => {
try {
this.destroy()
} catch (e) {
_converse.log(e, Strophe.LogLevel.ERROR);
}
}, 20000);
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment