Merge branch 'master' into feat/revisions

This commit is contained in:
James
2021-12-22 14:21:43 -05:00
5 changed files with 7 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ const getDataByPath = (fields: Fields, path: string): unknown => {
const name = path.split('.').pop();
const data = Object.keys(fields).reduce((matchedData, key) => {
if (key.indexOf(`${path}.`) === 0) {
if (key.indexOf(`${path}.`) === 0 || key === path) {
return {
...matchedData,
[key.replace(pathPrefixToRemove, '')]: fields[key],