Validate received values in widgets to avoid crashes
Open
pinned
type: bug
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
Some widgets throw when they receive an unexpected value, which causes the entire editor to error out.
**To Reproduce**
- Create a raw content file to edit in the CMS
- In the file frontmatter (or in the general file if it's a data file) include a property with a string value
- Configure the CMS to edit this property with a list widget
- Load the entry
**Expected behavior**
The CMS shouldn't crash.
**Additional context**
Related to #3509
This strategy should apply to both widget control components and preview components.
Contributor guide
Assessment
This issue has not been assessed yet.