Skip to content

Commit

Permalink
When validating postcode exit early in the update function if the 'op…
Browse files Browse the repository at this point in the history
…tion' is undefined. This can happen with stores that have a different deault country than US
  • Loading branch information
codekipple committed Jan 8, 2018
1 parent b09ab2a commit c8ff538
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/code/Magento/Ui/view/base/web/js/form/element/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ define([
return;
}
option = options[value];

if (typeof option === 'undefined') {
return;
}

defaultPostCodeResolver.setUseDefaultPostCode(!option['is_zipcode_optional']);

if (this.skipValidation) {
Expand Down

0 comments on commit c8ff538

Please sign in to comment.