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:
parent
063ba1de5e
commit
c77c7ca17d
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue