Skip to content

Commit

Permalink
fix(plugin-form-builder): hook overrides not working as intended (#6203)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpopus committed May 3, 2024
1 parent fbec3a3 commit b735d6a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -91,12 +91,12 @@ export const generateSubmissionCollection = (formConfig: PluginConfig): Collecti
...(formConfig?.formSubmissionOverrides?.fields || []),
],
hooks: {
...(formConfig?.formSubmissionOverrides?.hooks || {}),
beforeChange: [
(data) => createCharge(data, formConfig),
(data) => sendEmail(data, formConfig),
...(formConfig?.formSubmissionOverrides?.hooks?.beforeChange || []),
],
...(formConfig?.formSubmissionOverrides?.hooks || {}),
},
}

Expand Down

0 comments on commit b735d6a

Please sign in to comment.