From 2342b0c39a90b8abdbbca07c3c5294127b11e58f Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 6 Aug 2023 07:59:06 +0100 Subject: [PATCH] fix: 1c09422 error calling isset error calling isset: calling IsSet with unsupported type "invalid" () will always return false See https://github.com/wowchemy/wowchemy-hugo-themes/commit/1c094227ecea2f534321f80c6113522b234e5012#commitcomment-123412561 --- modules/wowchemy/layouts/partials/site_js.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/wowchemy/layouts/partials/site_js.html b/modules/wowchemy/layouts/partials/site_js.html index 0fe41d8ef..8d26f57f7 100644 --- a/modules/wowchemy/layouts/partials/site_js.html +++ b/modules/wowchemy/layouts/partials/site_js.html @@ -151,13 +151,13 @@ {{ $use_headroom := not (.IsHome | or (eq .Type "book")) }} {{/* Check for the global site parameter `header.on_scroll` */}} -{{ if (isset site.Params.header "on_scroll") }} +{{ if site.Params.header.on_scroll }} {{ $use_headroom = eq site.Params.header.on_scroll "disappear" }} {{ end }} {{/* Check for the page parameter `header.on_scroll` */}} -{{ if (isset $.Params.header "on_scroll") }} - {{ $use_headroom = eq $.Params.header.on_scroll "disappear" }} +{{ if .Params.header.on_scroll }} + {{ $use_headroom = eq .Params.header.on_scroll "disappear" }} {{ end }} {{/* Output `use_headroom` variable for Headroom initialization in Wowchemy JS */}}