fix: 1c09422 error calling isset

error calling isset: calling IsSet with unsupported type "invalid" (<nil>) will always return false

See https://github.com/wowchemy/wowchemy-hugo-themes/commit/1c094227ecea2f534321f80c6113522b234e5012#commitcomment-123412561
This commit is contained in:
George Cushen committed 2023-08-06 07:59:06 +01:00
1 parent 1c094227ec
commit 2342b0c39a
1 file changed
+3 -3
@@ -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 */}}