diff --git a/chrome/content/zotero/xpcom/sync/syncLocal.js b/chrome/content/zotero/xpcom/sync/syncLocal.js index 3c99c538e5..baeb6323f3 100644 --- a/chrome/content/zotero/xpcom/sync/syncLocal.js +++ b/chrome/content/zotero/xpcom/sync/syncLocal.js @@ -1115,7 +1115,7 @@ Zotero.Sync.Data.Local = { obj.fromJSON(json.data); } if (obj.objectType == 'item' && obj.isImportedAttachment()) { - this._checkAttachmentForDownload(obj, json.data.mtime, options.isNewObject); + yield this._checkAttachmentForDownload(obj, json.data.mtime, options.isNewObject); } obj.version = json.data.version; if (!options.saveAsChanged) { diff --git a/test/tests/itemTreeViewTest.js b/test/tests/itemTreeViewTest.js index d1e7761487..cf34db63da 100644 --- a/test/tests/itemTreeViewTest.js +++ b/test/tests/itemTreeViewTest.js @@ -159,6 +159,11 @@ describe("Zotero.ItemTreeView", function() { assert.equal(itemsView.rowCount, 1); assert.equal(quicksearch.value, searchString); + + // Clear search + quicksearch.value = ""; + quicksearch.doCommand(); + yield itemsView._refreshPromise; }); it("shouldn't change selection outside of trash if new trashed item is created with skipSelect", function* () {