form
form copied to clipboard
fix for getFieldValue creating a new field in fieldMeta issue
Trying to fix this issue: https://github.com/react-component/form/issues/181
Copied from issue log for your convenience:
https://codesandbox.io/s/50x3l7y59n
Steps to reproduce
- click "Add field" button
- new row will be created with no issue
- click "Error Button" button, no impacts to the function since the "list" variable has been initialized as an Array correctly.
- reload the page
- this time click "Error Button" first.
- a new field "list" will be added to fieldMeta
- click "Add field" button
- error occurred because list is an 'object' instead of 'Array'

I don't why the check failed at coverage step. Can anyone have a look on this?