From cbb1ebad332cb8ae81bb3f42ed38d63ceea653f4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 1 Nov 2022 03:17:26 -0400 Subject: [PATCH] Fix Quick Copy drag after reiniting translators Zotero.Translators.reinit() didn't reinit Quick Copy, so if an export translator was selected it wouldn't be preloaded again and dragging would fail with "Code promise is not resolved in noWait mode". --- chrome/content/zotero/xpcom/translation/translators.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translators.js b/chrome/content/zotero/xpcom/translation/translators.js index 3bafc88b33..ff5df9c739 100644 --- a/chrome/content/zotero/xpcom/translation/translators.js +++ b/chrome/content/zotero/xpcom/translation/translators.js @@ -263,8 +263,9 @@ Zotero.Translators = new function() { }); - this.reinit = function (options = {}) { - return this.init(Object.assign({}, options, { reinit: true })); + this.reinit = async function (options = {}) { + await this.init(Object.assign({}, options, { reinit: true })); + await Zotero.QuickCopy.init(); };