Skip to content

Commit abe6b52

Browse files
committed
Fixes #2: Directly nested arrays not rendrered properly.
1 parent 4098a9e commit abe6b52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/form.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ export default class Form extends React.Component {
125125
if (coords.length) {
126126
addDataUsingCoords(coords, data[coord], value);
127127
} else {
128-
if (Array.isArray(data)) {
129-
data.push(value);
128+
if (Array.isArray(data[coord])) {
129+
data[coord].push(value);
130130
}
131131
else {
132-
if (Array.isArray(data[coord])) {
133-
data[coord].push(value);
132+
if (Array.isArray(data)) {
133+
data.push(value);
134134
} else {
135135
data[coord] = value;
136136
}

0 commit comments

Comments
 (0)