Skip to content

Commit

Permalink
Merge pull request #372 from brenbl/fix-address-book
Browse files Browse the repository at this point in the history
Avoid js error in addressbook when housenumber or addition are empty
  • Loading branch information
DarthFly authored May 22, 2024
2 parents 52ab789 + 257a1d2 commit 7df5295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/frontend/templates/customer/address/Postcode.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ $addition = $block->getStreetLine(3);
houseNumberValue = $('.field.street').find('.control input:eq('+streetLineId+')').val(),
houseAdditionValue = $('.field.street').find('.control input:eq('+(streetLineId + 1)+')').val();
if (!houseAdditionValue) {
houseNumberValue = <?= $block->escapeJs($houseNumber); ?>;
houseNumberValue = '<?= $block->escapeJs($houseNumber); ?>';
}
if (!houseAdditionValue) {
houseAdditionValue = <?= $block->escapeJs($addition); ?>;
houseAdditionValue = '<?= $block->escapeJs($addition); ?>';
}

var housenumberElement = $('.field.zip').clone();
Expand Down

0 comments on commit 7df5295

Please sign in to comment.