We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fb9665 commit 0d76db9Copy full SHA for 0d76db9
layouts/partials/get-feature-flags.html
@@ -1,5 +1,5 @@
1
-{{- /* Extract parameter with validation */ -}}
2
-{{- $featureName := . -}}
+{{- /* Extract parameter with defaults and validation */ -}}
+{{- $featureName := . | default false -}}
3
{{- $featureFlags := site.Params.featureflags -}}
4
{{- if ne (printf "%T" (index $featureFlags $featureName)) "bool" -}}
5
{{ errorf "Expected type of feature flag params to be boolean." }}
0 commit comments