diff -u b/core/themes/classy/templates/misc/status-messages.html.twig b/core/themes/classy/templates/misc/status-messages.html.twig --- b/core/themes/classy/templates/misc/status-messages.html.twig +++ b/core/themes/classy/templates/misc/status-messages.html.twig @@ -23,8 +23,10 @@ * @see template_preprocess_status_messages() */ #} +{% if message_list is not empty %} + {{ attach_library('classy/messages') }} +{% endif %} {% block messages %} -{{ attach_library('classy/messages') }} {% for type, messages in message_list %} {% set classes = [