@gem-sdk/components 2.0.0-dev.388 → 2.0.0-dev.389

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,11 +52,16 @@ const ProductBundleDiscount = ({ rawChildren, setting, styles: styles$1, advance
52
52
  return core.template`
53
53
  {% for productBundle in productBundleItem %}
54
54
  ${system.Liquid(`
55
- {% assign attrs = productBundle | split: '($3)' %}
55
+ {% assign attrs = productBundle | split: '($3)' %}
56
56
  {% assign parsedAttrs = '' %}
57
57
  {% for attr in attrs %}
58
58
  {% assign attrParts = attr | split: '($:)' %}
59
- {% assign parsedAttrs = parsedAttrs | append: attrParts[0] | append: '=' | append: attrParts[2] | append: ' ' %}
59
+ {% assign attrKey = attrParts[0] %}
60
+ {% assign attrValue = attrParts[2] | strip %}
61
+
62
+ {% if attrValue != '' %}
63
+ {% assign parsedAttrs = parsedAttrs | append: attrKey | append: '=' | append: attrValue | append: ' ' %}
64
+ {% endif %}
60
65
  {% endfor %}
61
66
  `)}
62
67
  ${system.LiquidIf(`forloop.index0 == ${i}`, renderBundleItem('{{ parsedAttrs | strip }}', i))}
@@ -48,11 +48,16 @@ const ProductBundleDiscount = ({ rawChildren, setting, styles, advanced, style }
48
48
  return template`
49
49
  {% for productBundle in productBundleItem %}
50
50
  ${Liquid(`
51
- {% assign attrs = productBundle | split: '($3)' %}
51
+ {% assign attrs = productBundle | split: '($3)' %}
52
52
  {% assign parsedAttrs = '' %}
53
53
  {% for attr in attrs %}
54
54
  {% assign attrParts = attr | split: '($:)' %}
55
- {% assign parsedAttrs = parsedAttrs | append: attrParts[0] | append: '=' | append: attrParts[2] | append: ' ' %}
55
+ {% assign attrKey = attrParts[0] %}
56
+ {% assign attrValue = attrParts[2] | strip %}
57
+
58
+ {% if attrValue != '' %}
59
+ {% assign parsedAttrs = parsedAttrs | append: attrKey | append: '=' | append: attrValue | append: ' ' %}
60
+ {% endif %}
56
61
  {% endfor %}
57
62
  `)}
58
63
  ${LiquidIf(`forloop.index0 == ${i}`, renderBundleItem('{{ parsedAttrs | strip }}', i))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.388",
3
+ "version": "2.0.0-dev.389",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",