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 = [ 'hero' ] %}
{% set section_classes = section_classes|merge(styles) %} {% set section_classes = section_classes|merge(styles) %}
{% endif %} {% 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') %} {% set section_attributes = create_attribute().addClass(section_classes).setAttribute('data-headerbg', 'light') %}
<section {{ section_attributes }}> <section {{ section_attributes }}>
{% endif %} {% endif %}
@ -69,6 +69,6 @@
{% endif %} {% endif %}
</div> </div>
{% endblock paragraph %} {% 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> </section>
{% endif %} {% endif %}