Ensure that promises always resolve, or that rejections are okay

This commit is contained in:
Scott Nonnenberg 2017-07-14 17:05:23 -07:00
parent 4da1722ee8
commit e6859a3684
3 changed files with 8 additions and 3 deletions

View file

@ -636,7 +636,9 @@
},
fetchMessages: function() {
if (!this.id) { return false; }
if (!this.id) {
return Promise.reject('This conversation has no id!');
}
return this.messageCollection.fetchConversation(this.id, null, this.get('unreadCount'));
},