Somehow the content of a slice item gets lost in an append:
I create a slice and depending on being in the correct file I add a slice item. This works fine with the slice ($js) showing all three items. However, the content of the appended item is not added.
If I add $lightbox to the initial slice then resources.Concat works fine so somehow the content of $lightbox gets lost in the append.
{{- $cookie := resources.Get "js/cookie-consent.js" }}
{{- $tooltip := resources.Get "/js/tooltip.js" -}}
{{- $lightbox := resources.Get "/js/lightbox.js" -}}
{{- $js := slice $cookie $tooltip -}}
<!-- add lightbox in gallery -->
{{- if eq $.Params.translationKey "gallery" }}
{{ $js = append $lightbox $js -}}
{{- end }}
{{ $js }}
{{- $js := $js | resources.Concat "js/scripts.js" -}}
hugo v0.100.1+extended
github git@github.com:ourmaninindia/summertimegoa2022.git (develop branch)