Skip to content

Commit 1629b0a

Browse files
fix: boolean statement
1 parent 75579c3 commit 1629b0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/components/bolt-share/src/share.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% set base_class = "c-bolt-share" %}
1111
{% set attributes = create_attribute(attributes|default({})) %}
1212
{% set inner_attributes = create_attribute({}) %}
13-
{% set inline = inline == false and inline is not null ? false : true %}
13+
{% set inline = inline is sameas(true) or inline is sameas(false) ? inline : schema.inline.default %}
1414

1515
{# Default text can't be pulled from the schema because it must be translatable. #}
1616
{% set text = text | default("Share this page"|t) %}
@@ -89,13 +89,13 @@
8989

9090
{# Share component's custom element wrapper. #}
9191
<bolt-share
92-
{% if inline == true %} inline {% endif %}
92+
{% if inline %} inline {% endif %}
9393
{{ attributes }}
9494
>
9595
{# Array of classes based on the defined + default props. #}
9696
{% set classes = [
9797
base_class,
98-
inline == true ? "#{base_class}--display-inline" : "#{base_class}--display-button",
98+
inline ? "#{base_class}--display-inline" : "#{base_class}--display-button",
9999
] %}
100100

101101
<div {{ inner_attributes.addClass(classes) }}>

0 commit comments

Comments
 (0)