Skip to content

Commit

Permalink
fix: stripe validation condition fix (#5292)
Browse files Browse the repository at this point in the history
  • Loading branch information
maze-runnar committed Oct 13, 2020
1 parent 6a3c1f2 commit 45d4d7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ export default class Event extends ModelBase.extend(CustomPrimaryKeyMixin, {
}),

isStripeConnectionValid: computed('canPayByStripe', 'stripeAuthorization.stripeAuthCode', 'stripeAuthorization.stripePublishableKey', function() {
if (!this.canPayByStripe) {
return true;
}
return this.canPayByStripe && this.stripeAuthorization?.stripeAuthCode && this.stripeAuthorization?.stripePublishableKey;
})

Expand Down

0 comments on commit 45d4d7e

Please sign in to comment.