Do not overwrite set translators
This commit is contained in:
parent
72d3b8b711
commit
db8b8a9662
|
@ -1167,6 +1167,8 @@ Zotero.Translate.Base.prototype = {
|
|||
if(!returnValue && error) errorString = this._generateErrorString(error);
|
||||
|
||||
if(oldState === "detect") {
|
||||
if(this._clearTranslator) delete this.translator;
|
||||
|
||||
if(this._potentialTranslators.length) {
|
||||
var lastTranslator = this._potentialTranslators.shift();
|
||||
var lastProperToProxyFunction = this._properToProxyFunctions ? this._properToProxyFunctions.shift() : null;
|
||||
|
@ -1321,7 +1323,10 @@ Zotero.Translate.Base.prototype = {
|
|||
|
||||
this.incrementAsyncProcesses("Zotero.Translate#getTranslators");
|
||||
|
||||
this.translator = [translator];
|
||||
if(!this.translator) {
|
||||
this.translator = [translator];
|
||||
this._clearTranslator = true;
|
||||
}
|
||||
|
||||
try {
|
||||
var returnValue = this._sandboxManager.sandbox["detect"+this._entryFunctionSuffix].apply(null, this._getParameters());
|
||||
|
|
Loading…
Reference in New Issue
Block a user