diff --git a/frappe/templates/includes/head.html b/frappe/templates/includes/head.html
index 8ce6a76e50..154aff7048 100644
--- a/frappe/templates/includes/head.html
+++ b/frappe/templates/includes/head.html
@@ -2,8 +2,9 @@
{{ head_html or "" }}
{%- endif %}
-{%- if theme.name != 'Standard' -%}
+{%- if theme and theme.name != 'Standard' -%}
+
{%- else -%}
{{ include_style('website.bundle.css') }}
{%- endif -%}