diff --git a/packages/govuk-frontend/src/govuk/components/select/template.njk b/packages/govuk-frontend/src/govuk/components/select/template.njk
index fdd1b2466e..ec8e663d27 100644
--- a/packages/govuk-frontend/src/govuk/components/select/template.njk
+++ b/packages/govuk-frontend/src/govuk/components/select/template.njk
@@ -44,12 +44,12 @@
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
{% for item in params.items %}
{% if item %}
- {# Allow selecting by text content (the value for an option when no value attribute is specified) #}
- {% set effectiveValue = item.value | default(item.text) %}
-
+ {#- Allow selecting by text content (the value for an option when no value attribute is specified) #}
+ {%- set effectiveValue = item.value | default(item.text) %}
+
{% endif %}
{% endfor %}