Don't error on translation via server

This commit is contained in:
Simon Kornblith 2012-07-17 18:39:23 -04:00
parent 004e6bbd0a
commit ad4eccc54d

View file

@ -452,7 +452,8 @@ Zotero_TranslatorTester.prototype._runTestTranslate = function(translate, transl
if(!translators.length) {
testDoneCallback(this, test, "failed", "Detection failed");
return;
} else if(this.type === "web" && (translators[0].itemType !== "multiple" && test.items.length > 1 ||
} else if(this.type === "web" && translators[0].itemType !== "server"
&& (translators[0].itemType !== "multiple" && test.items.length > 1 ||
test.items.length === 1 && translators[0].itemType !== test.items[0].itemType)) {
// this handles "items":"multiple" too, since the string has length 8
testDoneCallback(this, test, "failed", "Detection returned wrong item type");