<div {% if attr is not empty -%}{%- for key, attribute in attr -%}{{- key -}}="{{- attribute -}}"{%- if not loop.first or not loop.last %} {% endif -%}{%- endfor -%}{%- else -%}class="alert alert-{{- context -}}{%- if dismissible %} alert-dismissible{%- endif %}" role="alert"{%- endif -%}>
    {%- if dismissible -%}
        {{- dismiss_button|raw -}}
    {%- endif -%}
    {%- if escape_prefix -%}
        {{- prefix -}}
    {%- else -%}
        {{- prefix|raw -}}
    {%- endif -%}
    {%- if escape_message -%}
        {%- if translate -%}
            {{- message|trans(translation_parameters, translation_domain) -}}
        {%- else -%}
            {{- message -}}
        {%- endif -%}
    {%- else -%}
        {%- if translate -%}
            {{- message|trans(translation_parameters, translation_domain)|raw -}}
        {%- else -%}
            {{- message|raw -}}
        {%- endif -%}
    {%- endif -%}
</div>

<div {% if attr is not empty -%}{%- for key, attribute in attr -%}{{- key -}}="{{- attribute -}}"{%- if not loop.first or not loop.last %} {% endif -%}{%- endfor -%}{%- else -%}class="alert alert-{{- context -}}{%- if dismissible %} alert-dismissible{%- endif %}" role="alert"{%- endif -%}>
    {%- if dismissible -%}
        {{- dismiss_button|raw -}}
    {%- endif -%}
    {%- if display_prefix -%}
        {%- if escape_prefix -%}
            {{- prefix -}}
        {%- else -%}
            {{- prefix|raw -}}
        {%- endif -%}
    {%- endif -%}
    {%- if escape_message -%}
        {%- if translate -%}
            {{- message|trans(translation_parameters, translation_domain) -}}
        {%- else -%}
            {{- message -}}
        {%- endif -%}
    {%- else -%}
        {%- if translate -%}
            {{- message|trans(translation_parameters, translation_domain)|raw -}}
        {%- else -%}
            {{- message|raw -}}
        {%- endif -%}
    {%- endif -%}
</div>

Add missing condition (if display_prefix)
Alert: Add missing condition (if display_prefix)
