Feeds electron compatiblity

This commit is contained in:
Adomas Venčkauskas 2018-08-31 15:32:33 +03:00
parent 6ec6790265
commit 1a6683e7db
4 changed files with 7 additions and 4 deletions

View file

@ -197,7 +197,7 @@ Zotero.FeedReader.prototype.terminate = function(status) {
}
// Close feed connection
if (this._channel.isPending()) {
if (this._channel && this._channel.isPending()) {
this._channel.cancel(Components.results.NS_BINDING_ABORTED);
}
};

View file

@ -218,7 +218,7 @@ describe("Zotero.FeedItem", function () {
yield item.toggleRead(true);
assert.isTrue(item.save.called, "item was saved on toggle read");
item.save.reset();
item.save.resetHistory();
yield item.toggleRead(true);
assert.isFalse(item.save.called, "item was not saved on toggle read to same state");

View file

@ -96,11 +96,11 @@ describe("Zotero.FeedItems", function () {
yield item.saveTx();
items.push(item);
}
ids = Array.map(items, (i) => i.id);
ids = items.map((i) => i.id);
});
afterEach(function* () {
save.reset();
save.resetHistory();
yield clearFeeds();
});

View file

@ -160,6 +160,9 @@ describe("Zotero.FeedReader", function () {
itemType: 'journalArticle',
enclosedItems: []
};
if (Zotero.isElectron) {
expected.pages = "1020";
}
let fr = new Zotero.FeedReader(detailedRSSFeedURL);
yield fr.process();