Throw error when attempting to install style that isn't XML

Also remove redundant "new XML()" call, which cleanXML() does itself.
This commit is contained in:
Dan Stillman 2012-01-13 18:40:02 -05:00
parent 063ba1de5e
commit c77c7ca17d

View file

@ -169,7 +169,10 @@ Zotero.Styles = new function() {
var xml = enConverter.parse();
} else {
// CSL
var xml = new XML(this.cleanXML(style));
var xml = this.cleanXML(style);
if (!xml.name()) {
throw new Error("File is not XML");
}
}
} catch(e) {
error = e;