From a71297bbfdc6567b757abd6f48a31f8a601a77dd Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 1 Jun 2019 18:05:41 +0100 Subject: [PATCH] fix: case when font and color themes not found even when present See #1118 --- layouts/partials/functions/parse_theme.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/functions/parse_theme.html b/layouts/partials/functions/parse_theme.html index d03b1e0f..bee11403 100644 --- a/layouts/partials/functions/parse_theme.html +++ b/layouts/partials/functions/parse_theme.html @@ -2,7 +2,7 @@ {{/* Attempt to load font style specified by user. */}} {{- $font_index := site.Params.font | default "default" -}} -{{ if isset site.Data.fonts $font_index }} +{{ if (index site.Data.fonts $font_index) }} {{- $font := index site.Data.fonts $font_index -}} {{- $scr.Set "google_fonts" $font.google_fonts -}} {{- $scr.Set "body_font" $font.body_font -}} @@ -17,7 +17,7 @@ {{/* Attempt to load color theme specified by user. */}} {{- $theme_index := site.Params.color_theme | default "default" -}} -{{ if isset site.Data.themes $theme_index }} +{{ if (index site.Data.themes $theme_index) }} {{ $theme := index site.Data.themes $theme_index }} {{- $scr.Set "light" ($theme.light | default true) -}}