Fix sync error on missing full-text

If a version is returned for an item's full-text content but a 404 is returned
for the content itself (because it's missing in Elasticsearch for some reason),
don't throw an error.

Also remove legacy array comprehensions in fulltext and syncFullTextEngine test
files, which apparently weren't being run.
This commit is contained in:
Dan Stillman 2016-04-30 01:10:12 -04:00
parent 750d691712
commit 10181f7f56
4 changed files with 52 additions and 8 deletions

View file

@ -167,7 +167,7 @@ describe("Zotero.Fulltext", function () {
yield Zotero.Attachments.createDirectoryForItem(attachment);
let path = attachment.getFilePath();
let content = [Zotero.Utilities.randomString() for (x of new Array(10))].join(" ");
let content = new Array(10).fill("").map(x => Zotero.Utilities.randomString()).join(" ");
yield Zotero.File.putContentsAsync(path, content);
if (!options.skip) {