From 4c51883b9725ffd4a09dc0f1e8fa6905f9deb253 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 29 Jul 2025 00:51:53 -0400 Subject: [PATCH] Restore Zotero.Promise.method() on ItemGetter#setAll() Required for noWait translation --- chrome/content/zotero/xpcom/translation/translate_item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 58d7846f1a..0ad02d2fbc 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -1111,7 +1111,7 @@ Zotero.Translate.ItemGetter.prototype = { * NOTE: This function should use the Zotero.Promise.method wrapper which adds a * isResolved property to the returned promise for noWait translation. */ - setAll: async function (libraryID, getChildCollections) { + setAll: Zotero.Promise.method(async function (libraryID, getChildCollections) { this._itemsLeft = (await Zotero.Items.getAll(libraryID, true)) .filter((item) => { // Don't export annotations @@ -1128,7 +1128,7 @@ Zotero.Translate.ItemGetter.prototype = { this._itemsLeft.sort((a, b) => a.id - b.id); this.numItems = this._itemsLeft.length; - }, + }), exportFiles: function (dir, extension, { includeAnnotations }) { // generate directory