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

@@ -474,8 +474,10 @@
});
this.inProgressFetch = null;
}.bind(this));
}.bind(this)).catch(function(error) {
console.log('fetchMessages error:', error && error.stack ? error.stack : error);
this.inProgressFetch = null;
}.bind(this));
// TODO catch?
return this.inProgressFetch;
},