Skip to content

Commit 1cc23ba

Browse files
fix: CV rendering failure without Volunteer field (#3479)
Fixes #3478
1 parent 751670c commit 1cc23ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

_layouts/cv.liquid

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ layout: default
122122

123123
<!-- RenderCV Sections - Merge Experience and Volunteer -->
124124
{% comment %} First, combine Experience and Volunteer entries {% endcomment %}
125-
{% assign combined_experience = cv.sections.Experience | concat: cv.sections.Volunteer %}
125+
{% assign empty_array = '' | split: ',' %}
126+
{% assign exp = cv.sections.Experience | default: empty_array %}
127+
{% assign vol = cv.sections.Volunteer | default: empty_array %}
128+
{% assign combined_experience = exp | concat: vol %}
126129
{% if combined_experience.size > 0 %}
127130
<a class="anchor" id="experience"></a>
128131
<div class="card mt-3 p-3">
@@ -258,7 +261,10 @@ layout: default
258261
{% endif %}
259262

260263
<!-- JSONResume Sections - Merge work and volunteer into Experience -->
261-
{% assign combined_experience = site.data.resume.work | concat: site.data.resume.volunteer %}
264+
{% assign empty_array = '' | split: ',' %}
265+
{% assign work = site.data.resume.work | default: empty_array %}
266+
{% assign vol = site.data.resume.volunteer | default: empty_array %}
267+
{% assign combined_experience = work | concat: vol %}
262268
{% if combined_experience.size > 0 %}
263269
<a class="anchor" id="experience"></a>
264270
<div class="card mt-3 p-3">

0 commit comments

Comments
 (0)