fix(plugin-notification-manager): fix undefined bug (#5528)

This commit is contained in:
Junyi 2024-10-28 17:44:22 +08:00 committed by GitHub
parent 34d6dd96b3
commit 20e8d799ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ export const ContentConfigForm = withDynamicSchemaProps(
observer<{ variableOptions: any; channelType: string }>(
({ variableOptions, channelType }) => {
const channelTypeMap = useChannelTypeMap();
const { ContentConfigForm = () => null } = (channelType ? channelTypeMap[channelType] : {}).components || {};
const { ContentConfigForm = () => null } = (channelType ? channelTypeMap[channelType] : {})?.components || {};
return <ContentConfigForm variableOptions={variableOptions} />;
},
{ displayName: 'ContentConfigForm' },