mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-09 19:13:20 +00:00
Fix empty args
This commit is contained in:
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user