Skip to content

Commit

Permalink
Fix card data visibility if saved cards feature disabled (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
lchrusciel authored Nov 4, 2024
2 parents 5347811 + 5c27875 commit 0dffa29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/shop/js/card_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ export class CardForm {
this.#cardNumber.addEventListener('keyup', this.#updateCardOperatorIcon.bind(this));
this.#expirationMonth.addEventListener('change', this.#validateExpirationDate.bind(this));
this.#expirationYear.addEventListener('change', this.#validateExpirationDate.bind(this));
this.#savedCardsSelect.addEventListener('change', this.#updateCardDataVisibility.bind(this));

if (this.#savedCardsSelect !== null) {
this.#savedCardsSelect.addEventListener('change', this.#updateCardDataVisibility.bind(this));
}

this.#form.addEventListener('submit', (event) => {
if (!this.#isVisible()) {
Expand Down

0 comments on commit 0dffa29

Please sign in to comment.