fix: 🐛 update hidden secrets and flatten-nested-object logic (#2672)
This commit is contained in:
1 parent
2e94ebdb64
commit
cb895024e0
3 files changed
+7
-3
No files matched your search
@@ -18,8 +18,8 @@ export const flattenObject = (obj, result = {}, parentKey = '') => {
|
||||
if (typeOf(obj[key]) === 'object' && obj[key] !== null) {
|
||||
// Recursively flatten the object
|
||||
flattenObject(obj[key], result, `${parentKey}${key}.`);
|
||||
} else if (obj[key]) {
|
||||
// Only add to result if the value is not null
|
||||
} else if (obj[key] !== null && obj[key] !== '') {
|
||||
// Only add to result if the value is not null or an empty string
|
||||
result[`${parentKey}${key}`] = obj[key];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user