Catch cancelation of confirmation dialog

Avoid 'Uncaught (in promise)' error in the console.

// FREEBIE
This commit is contained in:
lilia 2015-11-02 17:03:55 -08:00
parent c64fe8410e
commit 6717390e83

View file

@ -181,7 +181,9 @@
this.confirm("Permanently delete this conversation?").then(function() { this.confirm("Permanently delete this conversation?").then(function() {
this.model.destroyMessages(); this.model.destroyMessages();
this.remove(); this.remove();
}.bind(this)); }.bind(this)).catch(function() {
// clicked cancel, nothing to do.
});
this.$('.menu-list').hide(); this.$('.menu-list').hide();
}, },