fix: fix the CategoryWidget errors

This commit is contained in:
MrWindlike 2022-04-08 10:57:18 +08:00
parent 1bedbfdf02
commit 1850625d98

View File

@ -82,13 +82,13 @@ export const CategoryWidget: React.FC<WidgetProps> = props => {
if (typeof propertySpec === 'boolean') {
return null;
}
return shouldRender(spec.conditions || [], value) ? (
return shouldRender(propertySpec.conditions || [], value) ? (
<SpecWidget
key={name}
component={component}
spec={{
...spec,
title: spec.title || name,
...propertySpec,
title: propertySpec.title || name,
}}
value={value?.[name!]}
path={path.concat(name!)}