diff --git a/chrome/content/zotero/xpcom/feedReader.js b/chrome/content/zotero/xpcom/feedReader.js index 5e4acc4b75..5f484d2f67 100644 --- a/chrome/content/zotero/xpcom/feedReader.js +++ b/chrome/content/zotero/xpcom/feedReader.js @@ -221,6 +221,17 @@ Zotero.FeedReader.prototype.terminate = function (status) { // Reject feed promise if not resolved yet this._feedProcessed.reject(new Error(status)); + + // Reject feed item promise if not resolved yet + let lastItem = this._feedItems[this._feedItems.length - 1]; + // It seemed like a good idea to reject the last item but + // it's not really been useful yet, aside from bluebird + // throwing errors about unhandled rejections in tests + // so we suppress them here. TODO: We should probably + // rethink whether this code makes sense and make it better. + // FIXME: fx140: We can no longer "handle" the rejection here + let er = new Error(status); + lastItem.reject(er); }; Zotero.defineProperty(Zotero.FeedReader.prototype, 'feedProperties', {