Fix "invalid 'instanceof' operand Zotero.Exception" error

This was hiding the actual error when there was an error installing the
parent style of a dependent style.
This commit is contained in:
Dan Stillman 2014-03-26 16:12:36 -04:00
parent 62fb1024b2
commit f70d0c0b29

View file

@ -363,7 +363,7 @@ Zotero.Styles = new function() {
return Zotero.HTTP.promise("GET", source).then(function(xmlhttp) {
return _install(xmlhttp.responseText, origin, true);
}).fail(function(error) {
if(typeof error === "object" && error instanceof Zotero.Exception) {
if(typeof error === "object" && error instanceof Zotero.Exception.Alert) {
throw new Zotero.Exception.Alert("styles.installSourceError", [origin, source],
"styles.install.title", error);
} else {