Fix empty args

This commit is contained in:
mark
2023-12-25 07:27:08 +01:00
parent ea78805587
commit 92c69b6011

View File

@@ -14,7 +14,7 @@
{{ $error = true }}
{{ end }}
{{ $args := .args | default slice }}
{{ $args := .args | default dict }}
{{ $definitions := (index site.Data.structures $structure).arguments }}
{{ if not $definitions }}
@@ -100,7 +100,7 @@
{{ range $key, $val := $definitions }}
{{ if not $val.optional }}
{{ if $namedArgs }}
{{ if not (isset $args $key )}}
{{ if not (isset $args $key) }}
{{ warnf "[%s] argument '%s': expected value" $structure $key }}
{{ $error = true }}
{{ end }}