fix(trigger): deal with empty manualPropertiesSchema

This commit is contained in:
yessenia 2025-10-21 19:49:42 +08:00
parent 3d5e2c5ca1
commit f4acc78f66

View File

@ -301,12 +301,14 @@ export const CommonCreateModal = ({ onClose, createType, builder }: Props) => {
} }
if (createType !== SupportedCreationMethods.MANUAL) { if (createType !== SupportedCreationMethods.MANUAL) {
if (autoCommonParametersSchema.length > 0) {
const autoCommonParametersFormValues = autoCommonParametersFormRef.current?.getFormValues({}) || defaultFormValues const autoCommonParametersFormValues = autoCommonParametersFormRef.current?.getFormValues({}) || defaultFormValues
if (!autoCommonParametersFormValues?.isCheckValidated) if (!autoCommonParametersFormValues?.isCheckValidated)
return return
params.parameters = autoCommonParametersFormValues.values params.parameters = autoCommonParametersFormValues.values
} }
else { }
else if (manualPropertiesSchema.length > 0) {
const manualFormValues = manualPropertiesFormRef.current?.getFormValues({}) || defaultFormValues const manualFormValues = manualPropertiesFormRef.current?.getFormValues({}) || defaultFormValues
if (!manualFormValues?.isCheckValidated) if (!manualFormValues?.isCheckValidated)
return return