Better error for unsupported translator

This commit is contained in:
Simon Kornblith 2011-07-10 22:55:27 +00:00
parent d47381512e
commit f9b074496f

View file

@ -944,6 +944,12 @@ Zotero.Translate.Base.prototype = {
* Called when translator has been retrieved and loaded
*/
"_translateTranslatorLoaded":function() {
if(!this.translator[0].code) {
this.complete(false,
new Error("Translator "+this.translator[0].label+" is unsupported within this environment"));
return;
}
// set display options to default if they don't exist
if(!this._displayOptions) this._displayOptions = this.translator[0].displayOptions;