We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c1892b commit 2a34a4dCopy full SHA for 2a34a4d
js/formDataToJson.js
@@ -16,7 +16,6 @@ async function retrieveFile(filePath) {
16
17
function isMultiSelect(obj) {
18
if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) return false;
19
-
20
for (const key in obj) {
21
if (typeof obj[key] !== 'boolean') {
22
return false;
@@ -55,7 +54,7 @@ function populateObject(data, fields) {
55
54
value = getSelectedOptions(value);
56
}
57
// Recurses if multi-field object
58
- else if (typeof value === 'object' && value !== null && Object.keys(value).length > 1) {
+ else if (typeof value === 'object' && !Array.isArray(value) && value !== null && Object.keys(value).length > 1) {
59
value = populateObject(value, Object.keys(value));
60
61
0 commit comments