mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
return false when a locales file cannot be found, instead of throwing an error
This commit is contained in:
parent
7b062f3b15
commit
69a962be90
1 changed files with 6 additions and 2 deletions
|
|
@ -203,8 +203,12 @@ Zotero.Cite.System.retrieveLocale = function(lang) {
|
|||
var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
|
||||
xhr.open("GET", "chrome://zotero/content/locale/csl/locales-"+lang+".xml", false);
|
||||
xhr.overrideMimeType("application/octet-stream");
|
||||
xhr.send();
|
||||
return xhr.responseText;
|
||||
try {
|
||||
xhr.send();
|
||||
return xhr.responseText;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Zotero.Cite.System.getAbbreviations = function() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue