mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Fix export translation
Restore Zotero.Promise.method() wrapper on getCodeForTranslator() because the translation framework needs it to return a synchronously resolved promise, unfortunately.
This commit is contained in:
parent
04e03478a9
commit
1dd60c948b
1 changed files with 2 additions and 2 deletions
|
|
@ -363,7 +363,7 @@ Zotero.Translators = new function () {
|
|||
return _translators[id] ? _translators[id] : false;
|
||||
}
|
||||
|
||||
this.getCodeForTranslator = function (translator) {
|
||||
this.getCodeForTranslator = Zotero.Promise.method(function (translator) {
|
||||
if (translator.code) return translator.code;
|
||||
return Zotero.File.getContentsAsync(translator.path).then(function (code) {
|
||||
if (translator.cacheCode) {
|
||||
|
|
@ -372,7 +372,7 @@ Zotero.Translators = new function () {
|
|||
}
|
||||
return code;
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets all translators for a specific type of translation
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue