Skip to content

Commit

Permalink
Merge pull request #912 from creative-commoners/pulls/1.4/field-names…
Browse files Browse the repository at this point in the history
…-in-disarray

FIX Support array field names when resolving values
  • Loading branch information
robbieaverill authored Jul 24, 2019
2 parents 0839605 + e822e1d commit 2b2091a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/src/lib/schemaFieldValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function findField(fields, name) {
return prev;
}
return findField(field.children, name);
}, fields.find(field => field.name === name));
}, fields.find(field => field.name === name || field.name === `${name}[]`));
}

/**
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function schemaFieldValues(schema, state) {
}

return Object.assign({}, prev, {
[match.name]: curr.value,
[curr.name]: curr.value,
});
}, {});
}

0 comments on commit 2b2091a

Please sign in to comment.