fix: handle bad data in list preview

This commit is contained in:
Daniel Lautzenheiser 2023-07-14 09:50:46 -04:00
parent 4bd8509d53
commit f08ae09efc

View File

@ -38,6 +38,10 @@ function renderNestedList(
} }
const ListPreview: FC<WidgetPreviewProps<ValueOrNestedValue[], ListField>> = ({ field, value }) => { const ListPreview: FC<WidgetPreviewProps<ValueOrNestedValue[], ListField>> = ({ field, value }) => {
if (!Array.isArray(value)) {
return null;
}
return ( return (
<div style={{ marginTop: '12px' }}> <div style={{ marginTop: '12px' }}>
<label> <label>