Use 'async' configOptions property to indicate promisified translators
Instead of >"2017-07-05" Addresses https://github.com/zotero/translators/issues/1353
This commit is contained in:
parent
5ff5ea88fb
commit
f7c1c56d7d
|
@ -83,7 +83,8 @@ Zotero.Translate.Sandbox = {
|
||||||
_itemDone: function (translate, item) {
|
_itemDone: function (translate, item) {
|
||||||
// https://github.com/zotero/translators/issues/1353
|
// https://github.com/zotero/translators/issues/1353
|
||||||
var asyncTranslator = !(translate instanceof Zotero.Translate.Web)
|
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) {
|
var run = function (resolve) {
|
||||||
Zotero.debug("Translate: Saving item");
|
Zotero.debug("Translate: Saving item");
|
||||||
|
|
|
@ -850,7 +850,9 @@ describe("Zotero.Translate", function() {
|
||||||
+ " });"
|
+ " });"
|
||||||
+ "}",
|
+ "}",
|
||||||
{
|
{
|
||||||
lastUpdated: "2017-07-05 00:00:00"
|
configOptions: {
|
||||||
|
async: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
var e = yield getPromiseError(translation.translate());
|
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"});
|
translation.setSearch({ itemType: "journalArticle", DOI: "10.111/Test"});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user