Skip to content

Commit c8ff538

Browse files
committed
When validating postcode exit early in the update function if the 'option' is undefined. This can happen with stores that have a different deault country than US
1 parent b09ab2a commit c8ff538

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element

1 file changed

+5
-0
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/region.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ define([
3535
return;
3636
}
3737
option = options[value];
38+
39+
if (typeof option === 'undefined') {
40+
return;
41+
}
42+
3843
defaultPostCodeResolver.setUseDefaultPostCode(!option['is_zipcode_optional']);
3944

4045
if (this.skipValidation) {

0 commit comments

Comments
 (0)