mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed config.json capitalization issue.
This commit is contained in:
parent
69364ea2d2
commit
4087a02fdb
3 changed files with 7 additions and 4 deletions
|
@ -145,7 +145,9 @@ module.exports.zeroPad = function(num, c) { if (c == null) { c = 2; } var s = '0
|
|||
// Exceptions is an array of "keyname" or "parent\keyname"
|
||||
module.exports.objKeysToLower = function (obj, exceptions, parent) {
|
||||
for (var i in obj) {
|
||||
if ((typeof obj[i] == 'object') && ((exceptions == null) || (exceptions.indexOf(i.toLowerCase()) == -1)) && ((parent != null) && (exceptions.indexOf(parent.toLowerCase() + '/' + i.toLowerCase()) == -1))) {
|
||||
if ((typeof obj[i] == 'object') &&
|
||||
((exceptions == null) || (exceptions.indexOf(i.toLowerCase()) == -1) && ((parent == null) || (exceptions.indexOf(parent.toLowerCase() + '/' + i.toLowerCase()) == -1)))
|
||||
) {
|
||||
module.exports.objKeysToLower(obj[i], exceptions, i); // LowerCase all key names in the child object
|
||||
}
|
||||
if (i.toLowerCase() !== i) { obj[i.toLowerCase()] = obj[i]; delete obj[i]; } // LowerCase all key names
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue