diff --git a/core/modules/system/templates/table.html.twig b/core/modules/system/templates/table.html.twig
index e437632..2d9235e 100644
--- a/core/modules/system/templates/table.html.twig
+++ b/core/modules/system/templates/table.html.twig
@@ -58,7 +58,12 @@
{% for cell in header %}
- <{{ cell.tag }}{% if cell.table_sort %}{{ cell.attributes.addClass('active') }}{% else %}{{ cell.attributes }}{% endif %}>
+ {%
+ set cell_classes = [
+ cell.table_sort ? 'active',
+ ]
+ %}
+ <{{ cell.tag }}{{ cell.attributes.addclass(cell_classes) }}>
{{- cell.content -}}
{{ cell.tag }}>
{% endfor %}
@@ -69,12 +74,20 @@
{% if rows %}