Skip to content

Commit 109b4e9

Browse files
authored
ENGCOM-4234: [Backport] Solved swagger response of product attribute option is_default #21164
2 parents bed498e + ba6cfa0 commit 109b4e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Directory/Model/ResourceModel/Country/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private function addDefaultCountryToOptions(array &$options)
328328

329329
foreach ($options as $key => $option) {
330330
if (isset($defaultCountry[$option['value']])) {
331-
$options[$key]['is_default'] = $defaultCountry[$option['value']];
331+
$options[$key]['is_default'] = !empty($defaultCountry[$option['value']]);
332332
}
333333
}
334334
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ define([
4949

5050
if (!this.value()) {
5151
defaultCountry = _.filter(result, function (item) {
52-
return item['is_default'] && item['is_default'].includes(value);
52+
return item['is_default'] && _.contains(item['is_default'], value);
5353
});
5454

5555
if (defaultCountry.length) {

0 commit comments

Comments
 (0)