diff --git a/material/base.html b/material/base.html
index 85b1d39e1..e2155b745 100644
--- a/material/base.html
+++ b/material/base.html
@@ -3,6 +3,9 @@
-#}
{% import "partials/language.html" as lang with context %}
{% set palette = config.theme.palette %}
+{% if not palette is mapping %}
+ {% set palette = palette | first %}
+{% endif %}
{% set font = config.theme.font %}
diff --git a/src/base.html b/src/base.html
index ff5e6a67c..84ab60aa5 100644
--- a/src/base.html
+++ b/src/base.html
@@ -24,6 +24,9 @@
{% set palette = config.theme.palette %}
+{% if not palette is mapping %}
+ {% set palette = palette | first %}
+{% endif %}
{% set font = config.theme.font %}