Skip to content

Commit 38c2706

Browse files
Merge remote-tracking branch 'origin/MC-34264' into 2.4-develop-pr35
2 parents 8f20696 + cdad976 commit 38c2706

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ define([
8484
quoteAddressToFormAddressData: function (addrs) {
8585
var self = this,
8686
output = {},
87-
streetObject;
87+
streetObject,
88+
customAttributesObject;
8889

8990
$.each(addrs, function (key) {
9091
if (addrs.hasOwnProperty(key) && !$.isFunction(addrs[key])) {
@@ -100,6 +101,16 @@ define([
100101
output.street = streetObject;
101102
}
102103

104+
//jscs:disable requireCamelCaseOrUpperCaseIdentifiers
105+
if ($.isArray(addrs.customAttributes)) {
106+
customAttributesObject = {};
107+
addrs.customAttributes.forEach(function (value) {
108+
customAttributesObject[value.attribute_code] = value.value;
109+
});
110+
output.custom_attributes = customAttributesObject;
111+
}
112+
//jscs:enable requireCamelCaseOrUpperCaseIdentifiers
113+
103114
return output;
104115
},
105116

0 commit comments

Comments
 (0)