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

@ -624,7 +624,7 @@
// SELECT messages WHERE conversationId = this.id ORDER
// received_at DESC
};
this.fetch(options).then(resolve);
this.fetch(options).always(resolve);
}.bind(this)).then(function() {
if (unreadCount > 0) {
if (unreadCount <= startingLoadedUnread) {
@ -637,6 +637,7 @@
return;
}
console.log('fetchConversation: doing another fetch to get all unread');
return this.fetchConversation(conversationId, limit, unreadCount);
}
}.bind(this));