should probably have thought harder before the last commit. change all lets to var, since it doesn't make a difference in this scope.
This commit is contained in:
parent
4283134d32
commit
df28ad6e76
1 changed files with 5 additions and 5 deletions
|
@ -196,19 +196,19 @@ Zotero.Cite.System.retrieveItem = function(item){
|
|||
};
|
||||
|
||||
Zotero.Cite.System.retrieveLocale = function(lang) {
|
||||
let protHandler = Components.classes["@mozilla.org/network/protocol;1?name=chrome"]
|
||||
var protHandler = Components.classes["@mozilla.org/network/protocol;1?name=chrome"]
|
||||
.createInstance(Components.interfaces.nsIProtocolHandler);
|
||||
let channel = protHandler.newChannel(protHandler.newURI("chrome://zotero/content/locale/csl/locales-"+lang+".xml", "UTF-8", null));
|
||||
var channel = protHandler.newChannel(protHandler.newURI("chrome://zotero/content/locale/csl/locales-"+lang+".xml", "UTF-8", null));
|
||||
try {
|
||||
let rawStream = channel.open();
|
||||
var rawStream = channel.open();
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
let converterStream = Components.classes["@mozilla.org/intl/converter-input-stream;1"]
|
||||
var converterStream = Components.classes["@mozilla.org/intl/converter-input-stream;1"]
|
||||
.createInstance(Components.interfaces.nsIConverterInputStream);
|
||||
converterStream.init(rawStream, "UTF-8", 65535,
|
||||
Components.interfaces.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
|
||||
let str = {};
|
||||
var str = {};
|
||||
converterStream.readString(channel.contentLength, str);
|
||||
converterStream.close();
|
||||
return str.value;
|
||||
|
|
Loading…
Reference in a new issue