aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-05-10 19:18:18 -0400
committertdro <tdro@noreply.example.com>2023-05-10 19:33:02 -0400
commit019f938f2394adca667b11a7640377053547b70e (patch)
tree0a58fe3854bc66914c48fecd6175947340b88b09 /themes
parenteadbad7563dfa571127e962d343726d6eec469ae (diff)
downloadcanory-019f938f2394adca667b11a7640377053547b70e.tar.gz
canory-019f938f2394adca667b11a7640377053547b70e.tar.bz2
canory-019f938f2394adca667b11a7640377053547b70e.zip
themes/default/layouts/partials/author-card: Guard empty metadata
More bug squashing under certain conditions
Diffstat (limited to 'themes')
-rw-r--r--themes/default/layouts/partials/author-card.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index 61c403a..0f7945e 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -17,9 +17,11 @@
{{- $sourceset = print "/" (partial "function-paths.html").media "/" .Data.user "/" .Data.user "-profile.webp" -}}
{{- with $metadata := resources.Get $metadata -}}
- {{- $metadata = $metadata.Content | transform.Unmarshal -}}
- {{- $width = $metadata.picture.profileWidth -}}
- {{- $height = $metadata.picture.profileHeight -}}
+ {{- with $content := $metadata.Content -}}
+ {{- $metadata = $content | transform.Unmarshal -}}
+ {{- $width = $metadata.picture.profileWidth -}}
+ {{- $height = $metadata.picture.profileHeight -}}
+ {{- end -}}
{{- end -}}
{{- if or