diff --git a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/zone-extensions.js b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/zone-extensions.js index 06ab57936..ec8868137 100644 --- a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/zone-extensions.js +++ b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/zone-extensions.js @@ -5,27 +5,9 @@ /** * Unflatten dot separated JSON objects into nested objects - */ - $.fn.unflattenObject = function(flatObj) { - const result = {}; - for (const flatKey in flatObj) { - const value = flatObj[flatKey]; - if (!flatKey) continue; - const keys = flatKey.split('.'); - let cur = result; - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - if (i === keys.length - 1) { - cur[k] = value; - } else { - cur[k] = cur[k] || {}; - cur = cur[k]; - } - } - } - return result; - } - + return str + .replace(/^[A-Z]/, match => match.toLowerCase()) + .replace(/\.[A-Z]/g, match => match.toLowerCase()); /** * @public * Handles zone fieldset serialization with DTO nesting