Add an error return from the figures/image shortcode if the images list contains a nil
This commit is contained in:
parent
8d7b2364db
commit
f0d0d5a136
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@
|
|||
<div class=container>
|
||||
{{ range $img := $imgs }}
|
||||
{{- $linkedImg := $img -}}
|
||||
{{ if not $img }}
|
||||
{{ errorf "Found nil in images list for %s" $.Page.Permalink }}
|
||||
{{ end }}
|
||||
{{- if $shouldResize -}}
|
||||
{{ $linkedImg = $img.Fit "1280x1280" }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue