final-form / final-form/react-final-form
Confusing error message when using an empty object for a decorator.
Open
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### **feature request**
### What is the current behavior?
If you pass in an empty object into an array of decorators, you get an error that is difficult to track down. I encountered this error because I had a placeholder decorator that was just an empty object.
Here is the error message:

### What is the expected behavior?
A handled error that states decorators must have at least one key/field.
### Sandbox Link
### What's your environment?
react-final-form version: ^6.5.0
final-form version: ^4.20.0
macOS Mojave version: 10.14.6
node version: 10.16.3
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.