Skip to content

Commit d468b9a

Browse files
Merge remote-tracking branch 'origin/MC-35805' into 2.3-develop-pr52
2 parents ca4e956 + c76f06c commit d468b9a

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
@@ -135,7 +135,8 @@ define([
135135
quoteAddressToFormAddressData: function (addrs) {
136136
var self = this,
137137
output = {},
138-
streetObject;
138+
streetObject,
139+
customAttributesObject;
139140

140141
$.each(addrs, function (key) {
141142
if (addrs.hasOwnProperty(key) && !$.isFunction(addrs[key])) {
@@ -151,6 +152,16 @@ define([
151152
output.street = streetObject;
152153
}
153154

155+
//jscs:disable requireCamelCaseOrUpperCaseIdentifiers
156+
if ($.isArray(addrs.customAttributes)) {
157+
customAttributesObject = {};
158+
addrs.customAttributes.forEach(function (value) {
159+
customAttributesObject[value.attribute_code] = value.value;
160+
});
161+
output.custom_attributes = customAttributesObject;
162+
}
163+
//jscs:enable requireCamelCaseOrUpperCaseIdentifiers
164+
154165
return output;
155166
},
156167

0 commit comments

Comments
 (0)