Commit 054e7f81 authored by Rob Swindell's avatar Rob Swindell

Fix TypeError: obj is not an object

Reported by Night Stalker (INTERNAL)
Most likely some unexpected content in sbbsecho.ini.
parent b3a87234
......@@ -51,16 +51,18 @@ function TickITCfg() {
function lcprops(obj)
{
var i;
var keys = Object.keys(obj);
for (i=0; i<keys.length; i++) {
if (keys[i].toLowerCase() !== keys[i]) {
if (obj[keys[i].toLowerCase()] === undefined)
obj[keys[i].toLowerCase()] = obj[keys[i]];
delete obj[keys[i]];
if (typeof(obj[keys[i].toLowerCase()]) == 'Object')
lcprops(obj[keys[i].toLowerCase()]);
if(typeof obj == 'object') {
var i;
var keys = Object.keys(obj);
for (i=0; i<keys.length; i++) {
if (keys[i].toLowerCase() !== keys[i]) {
if (obj[keys[i].toLowerCase()] === undefined)
obj[keys[i].toLowerCase()] = obj[keys[i]];
delete obj[keys[i]];
if (typeof(obj[keys[i].toLowerCase()]) == 'Object')
lcprops(obj[keys[i].toLowerCase()]);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment