Skip to content

Commit d70467a

Browse files
authored
ENGCOM-4019: Fixed Issue #20631 Console error on checkout after changing the allowed countries from admin #20634
2 parents 6f26f56 + 04ff11e commit d70467a

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ define([
2626
update: function (value) {
2727
var country = registry.get(this.parentName + '.' + 'country_id'),
2828
options = country.indexedOptions,
29-
option;
29+
option = null;
3030

3131
if (!value) {
3232
return;
3333
}
3434

3535
option = options[value];
36-
36+
37+
if (!option) {
38+
return;
39+
}
40+
3741
if (option['is_zipcode_optional']) {
3842
this.error(false);
3943
this.validation = _.omit(this.validation, 'required-entry');

0 commit comments

Comments
 (0)