Skip to content

Commit

Permalink
use with to avoid error
Browse files Browse the repository at this point in the history
When using your tool i had encountered this error. it's simply missing a `{{ with . }}` that you use in ` {{ else if reflect.IsMap . }}
` below
error calling partialCached: partial that returns a value needs a non-zero argument.
  • Loading branch information
loic-roux-404 authored Jan 1, 2021
1 parent 70488e5 commit 292e804
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions partials/private/parse.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
{{ $slice := slice }}
{{/* We range on its item */}}
{{ range . }}
{{/* As it is a slice, its entries might be "imports" */}}
{{ with partialCached "tnd-netlifycms/private/import" . . }}
{{/* We recursively use self partial to deep parse the result */}}
{{ with partialCached "tnd-netlifycms/private/parse" . . }}
{{/* We add the produced data as an entry to the newly processed slice */}}
{{ $slice = $slice | append . }}
{{ with . }}
{{/* As it is a slice, its entries might be "imports" */}}
{{ with partialCached "tnd-netlifycms/private/import" . . }}
{{/* We recursively use self partial to deep parse the result */}}
{{ with partialCached "tnd-netlifycms/private/parse" . . }}
{{/* We add the produced data as an entry to the newly processed slice */}}
{{ $slice = $slice | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
Expand Down Expand Up @@ -69,4 +71,4 @@
{{ $return = . }}
{{ end }}

{{ return $return }}
{{ return $return }}

0 comments on commit 292e804

Please sign in to comment.