www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit f7c1c56d7d9117e8c4c1dcac40e9518e2462cd39
parent 5ff5ea88fbe8e90c78ed0a86df0e7d7393eae465
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  5 Jul 2017 15:25:57 -0400

Use 'async' configOptions property to indicate promisified translators

Instead of >"2017-07-05"

Addresses https://github.com/zotero/translators/issues/1353

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 3++-
Mtest/tests/translateTest.js | 8++++++--
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -83,7 +83,8 @@ Zotero.Translate.Sandbox = { _itemDone: function (translate, item) { // https://github.com/zotero/translators/issues/1353 var asyncTranslator = !(translate instanceof Zotero.Translate.Web) - && translate.translator[0].lastUpdated > '2017-07-05'; + && translate.translator[0].configOptions + && translate.translator[0].configOptions.async; var run = function (resolve) { Zotero.debug("Translate: Saving item"); diff --git a/test/tests/translateTest.js b/test/tests/translateTest.js @@ -850,7 +850,9 @@ describe("Zotero.Translate", function() { + " });" + "}", { - lastUpdated: "2017-07-05 00:00:00" + configOptions: { + async: true + } } )); var e = yield getPromiseError(translation.translate()); @@ -906,7 +908,9 @@ describe("Zotero.Translate", function() { + " });" + "}", { - lastUpdated: "2017-07-05 00:00:00" + configOptions: { + async: true + } } )); translation.setSearch({ itemType: "journalArticle", DOI: "10.111/Test"});