From 292e804cd432f94349c9d4b736e57a9793cc5591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Roux?= <47380500+loic-roux-404@users.noreply.github.com> Date: Fri, 1 Jan 2021 23:38:38 +0100 Subject: [PATCH] use with to avoid error 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. --- partials/private/parse.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/partials/private/parse.html b/partials/private/parse.html index 3ab5538..bdff525 100644 --- a/partials/private/parse.html +++ b/partials/private/parse.html @@ -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 }} @@ -69,4 +71,4 @@ {{ $return = . }} {{ end }} -{{ return $return }} \ No newline at end of file +{{ return $return }}