Skip to content

Commit

Permalink
Add check
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps committed Mar 27, 2024
1 parent 1e9b2f0 commit 6448690
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/GiftAid/GiftAid.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ function GiftAid(props) {
setIsSubmitting(true); // Update state that's passed down to disable button during submission
// Rather than mess with the input field value itself (crummy UX), just sanitise the value on submission,
// removing any leading or trailing whitespace that the new regex brings allows for (see ENG-3193)
formValues.donationID = formValues.donationID.trim();
if (formValues.donationID) formValues.donationID = formValues.donationID.trim();
if (formValues.transactionId) formValues.transactionId = formValues.transactionId.trim();

axios.post(pathParams.endpoint, formValues) // post form data and settings to endpoint
.then(() => {
Expand Down

0 comments on commit 6448690

Please sign in to comment.