mirror of
https://github.com/vale981/Vulcan
synced 2025-03-04 17:21:37 -05:00
Fix case with no field specifier
This commit is contained in:
parent
3f7e1f4d8d
commit
6a7a70aada
1 changed files with 7 additions and 6 deletions
|
@ -217,13 +217,14 @@ class SmartForm extends Component {
|
||||||
Get a list of children-fields for a nested field.
|
Get a list of children-fields for a nested field.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
getChildFields = fieldName => this.props.fields.reduce((filtered, field) => {
|
getChildFields = fieldName => this.props.fields &&
|
||||||
const child = field.replace(new RegExp(`^${fieldName}\\.`), '');
|
this.props.fields.reduce((filtered, field) => {
|
||||||
if(child !== field)
|
const child = field.replace(new RegExp(`^${fieldName}\\.`), '');
|
||||||
return filtered ? filtered.push(child) : [child];
|
if(child !== field)
|
||||||
|
return filtered ? filtered.push(child) : [child];
|
||||||
|
|
||||||
return filtered;
|
return filtered;
|
||||||
}, null);
|
}, null);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue