Set this.translator for "detect" calls so that parentTranslator is set correctly

This commit is contained in:
aurimasv 2013-02-18 00:16:44 -06:00
parent 376db8d9f0
commit 72d3b8b711

View File

@ -1310,17 +1310,19 @@ Zotero.Translate.Base.prototype = {
var me = this;
this._loadTranslator(this._potentialTranslators[0],
function() { me._detectTranslatorLoaded() });
function() { me._detectTranslatorLoaded(me._potentialTranslators[0]) });
},
/**
* Runs detect code for a translator
*/
"_detectTranslatorLoaded":function() {
"_detectTranslatorLoaded":function(translator) {
this._prepareDetection();
this.incrementAsyncProcesses("Zotero.Translate#getTranslators");
this.translator = [translator];
try {
var returnValue = this._sandboxManager.sandbox["detect"+this._entryFunctionSuffix].apply(null, this._getParameters());
} catch(e) {