Skip to content

Commit

Permalink
fix: add conditional when wallet fields don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiano-mallmann authored Sep 5, 2023
1 parent 00fb289 commit 0d97e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/frontend/web/js/core/models/TwoCreditcardsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ define([
let saveFirstCard = 0;
let saveSecondCard = 0;

if (this.formObject[0].saveThisCard.prop('checked') == true) {
if (this.formObject[0].saveThisCard?.prop('checked') == true) {
saveFirstCard = 1;
}

if (this.formObject[1].saveThisCard.prop('checked') == true) {
if (this.formObject[1].saveThisCard?.prop('checked') == true) {
saveSecondCard = 1;
}

Expand Down

0 comments on commit 0d97e9e

Please sign in to comment.