fix(biography): make status.icon optional in resume-biography block

Add explicit type checking and proper trimming for status icon extraction
to match the more robust pattern used in resume-biography-3.

Fixes issue where users couldn't omit the emoji status badge.
This commit is contained in:
George Cushen committed 2026-01-24 19:19:43 +00:00
1 parent a17fc859f9
commit 58f7dcdaf9
2 files changed
+5 -2

No files matched your search

@@ -166,7 +166,7 @@
{{ if and $status (reflect.IsMap $status) }}
{{ $status_icon_raw := index $status "icon" }}
{{ if eq (printf "%T" $status_icon_raw) "string" }}
{{ $status_icon = $status_icon_raw }}
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
{{ end }}
{{ end }}
@@ -163,7 +163,10 @@
{{ $status_icon := "" }}
{{ with $profile.status }}
{{ if reflect.IsMap . }}
{{ with index . "icon" }}{{ $status_icon = strings.TrimSpace (printf "%v" .) }}{{ end }}
{{ $icon_raw := index . "icon" }}
{{ if eq (printf "%T" $icon_raw) "string" }}
{{ $status_icon = strings.TrimSpace $icon_raw }}
{{ end }}
{{ end }}
{{ end }}