From 6717390e838d8962eb3f41a3d65943bec43403a5 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 2 Nov 2015 17:03:55 -0800 Subject: [PATCH] Catch cancelation of confirmation dialog Avoid 'Uncaught (in promise)' error in the console. // FREEBIE --- js/views/conversation_view.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index e5ce03540..2d8e04452 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -181,7 +181,9 @@ this.confirm("Permanently delete this conversation?").then(function() { this.model.destroyMessages(); this.remove(); - }.bind(this)); + }.bind(this)).catch(function() { + // clicked cancel, nothing to do. + }); this.$('.menu-list').hide(); },