Skip to content

Commit

Permalink
fix: 1c09422 error calling isset
Browse files Browse the repository at this point in the history
error calling isset: calling IsSet with unsupported type "invalid" (<nil>) will always return false

See 1c09422#commitcomment-123412561
  • Loading branch information
gcushen committed Aug 6, 2023
1 parent 1c09422 commit 2342b0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/wowchemy/layouts/partials/site_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}}
Expand Down

0 comments on commit 2342b0c

Please # to comment.