Skip to content

Commit 4a21443

Browse files
committed
chore: modify getDefaultValuesFromConfigObject
1 parent 119ebe9 commit 4a21443

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Configuration/webapp/app/components/form/utils/getDefaultValuesFromConfigObject.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export const getDefaultValuesFromConfigObject = (
2828
if (!obj) {
2929
return {};
3030
}
31+
// omit arrays for now
32+
if (Array.isArray(obj)) {
33+
return {};
34+
}
3135
let result: Record<string, string | number | boolean> = {};
3236
const entries = Object.entries(obj);
3337
for (const [key, value] of entries) {
34-
// omit arrays for now
35-
if (!isNaN(parseInt(key, 10))) {
36-
continue;
37-
}
3838
const newPrefix = `${prefix}${KEY_SEPARATOR}${key}`;
3939
if (typeof value === 'object') {
4040
result = { ...result, ...getDefaultValuesFromConfigObject(value as FormItem, newPrefix) };

0 commit comments

Comments
 (0)