Skip to content

Commit ad56f70

Browse files
committed
fixed a bug within submit fn,
to correctly accept custom donation input
1 parent 3593ab9 commit ad56f70

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/DonateMoney.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ export default {
106106
this.customAmountSelected = !this.customAmountSelected;
107107
},
108108
submit() {
109-
let value = this.donationAmount;
109+
const value = this.customAmountSelected ?
110+
this.customDonationAmount : this.donationAmount;
110111
const input = format(value);
111112
112113
if (this.customAmountSelected) {
113-
value = this.customDonationAmount;
114-
// provides user feedback on input, actual validation occurs on submit
114+
// inputRule provides user feedback on input, but actual validation occurs on submit
115115
if (this.$refs.input.validate()) this.createCheckoutSession(input);
116116
}
117117

0 commit comments

Comments
 (0)