Commit 30a6e6cb authored by JC Brand's avatar JC Brand

Remove redundant function wrapping

parent 7ff99a50
...@@ -2666,8 +2666,7 @@ ...@@ -2666,8 +2666,7 @@
if (ev && ev.preventDefault) { if (ev && ev.preventDefault) {
ev.preventDefault(); ev.preventDefault();
} }
ev.preventDefault(); this.remove();
this.$el.remove();
this.model.destroy(); this.model.destroy();
converse.emit('onChatBoxClosed', this); converse.emit('onChatBoxClosed', this);
return this; return this;
...@@ -2699,12 +2698,8 @@ ...@@ -2699,12 +2698,8 @@
this.addChat(item); this.addChat(item);
} }
}, this); }, this);
this.model.on("destroy", function (item) { this.model.on("destroy", this.removeChat, this);
this.removeChat(item); this.model.on("change:minimized", this.onChanged, this);
}, this);
this.model.on("change:minimized", function (item) {
this.onChanged(item);
}, this);
}, },
render: function () { render: function () {
......
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