Skip to content

Commit

Permalink
Fixes #2: Directly nested arrays not rendrered properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhch committed Sep 3, 2021
1 parent 4098a9e commit abe6b52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ export default class Form extends React.Component {
if (coords.length) {
addDataUsingCoords(coords, data[coord], value);
} else {
if (Array.isArray(data)) {
data.push(value);
if (Array.isArray(data[coord])) {
data[coord].push(value);
}
else {
if (Array.isArray(data[coord])) {
data[coord].push(value);
if (Array.isArray(data)) {
data.push(value);
} else {
data[coord] = value;
}
Expand Down

0 comments on commit abe6b52

Please sign in to comment.