Skip to content

Commit c231bdf

Browse files
author
Oleksandr Iegorov
committed
MC-17808: Custom customer attribute code showing on guest checkout
1 parent c3f29ce commit c231bdf

File tree

1 file changed

+9
-14
lines changed
  • app/code/Magento/Checkout/view/frontend/web/template/billing-address

1 file changed

+9
-14
lines changed

app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,16 @@
1313
<a if="currentBillingAddress().telephone" attr="'href': 'tel:' + currentBillingAddress().telephone" text="currentBillingAddress().telephone"></a><br/>
1414

1515
<each args="data: currentBillingAddress().customAttributes, as: 'element'">
16-
<each args="data: Object.keys(element), as: 'attribute'">
17-
<if args="typeof element[attribute] === 'object'">
18-
<if args="element[attribute].label">
19-
<text args="element[attribute].label"/>
20-
</if>
21-
<ifnot args="element[attribute].label">
22-
<if args="element[attribute].value">
23-
<text args="element[attribute].value"/>
24-
</if>
25-
</ifnot>
16+
<if args="typeof element === 'object'">
17+
<if args="element.label">
18+
<text args="element.label"/>
2619
</if>
27-
<if args="typeof element[attribute] === 'string'">
28-
<text args="element[attribute]"/>
29-
</if><br/>
30-
</each>
20+
<ifnot args="element.label">
21+
<if args="element.value">
22+
<text args="element.value"/>
23+
</if>
24+
</ifnot>
25+
</if>
3126
</each>
3227

3328
<button visible="!isAddressSameAsShipping()"

0 commit comments

Comments
 (0)