Simplify the test; we don't think twig produces notices

This commit is contained in:
benjamin melançon 2018-11-20 03:13:17 -05:00
parent 39af4281ab
commit 9f24ccbf08

View file

@ -52,7 +52,7 @@
{% set section_classes = [ 'hero' ] %}
{% set section_classes = section_classes|merge(styles) %}
{% endif %}
{% if paragraph.field_style_escape_flow is not empty and paragraph.field_style_escape_flow.value == true %}
{% if paragraph.field_style_escape_flow.value == true %}
{% set section_attributes = create_attribute().addClass(section_classes).setAttribute('data-headerbg', 'light') %}
<section {{ section_attributes }}>
{% endif %}
@ -69,6 +69,6 @@
{% endif %}
</div>
{% endblock paragraph %}
{% if paragraph.field_style_escape_flow is not empty and paragraph.field_style_escape_flow.value == true %}
{% if paragraph.field_style_escape_flow.value == true %}
</section>
{% endif %}