Avoid error when no arguments are passed

This commit is contained in:
SachaG 2018-04-07 11:53:40 +09:00
parent f88cd9017d
commit 9b3b545219

View file

@ -202,7 +202,10 @@ class Form extends Component {
Get a list of the fields to be included in the current form
*/
getFieldNames = ({ schema = this.schema, excludeHiddenFields = true }) => {
getFieldNames = (args = {}) => {
const { schema = this.schema, excludeHiddenFields = true } = args;
const { fields, hideFields } = this.props;
// get all editable/insertable fields (depending on current form type)