mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-02-09 19:05:54 +01:00
Fix potential runtime errors with null/undefined date values
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
@@ -89,7 +89,7 @@ const educationNodes: Node[] = (education.value || []).map((item: EducationItem,
|
|||||||
data: {
|
data: {
|
||||||
label: item.degree,
|
label: item.degree,
|
||||||
subtitle: item.institution,
|
subtitle: item.institution,
|
||||||
years: `${item.startDate?.substring(0, 4)}-${item.endDate?.substring(0, 4)}`
|
years: `${item.startDate?.substring(0, 4) || ''}-${item.endDate?.substring(0, 4) || ''}`
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
background: '#3b82f6',
|
background: '#3b82f6',
|
||||||
@@ -118,7 +118,7 @@ const experienceNodes: Node[] = (experiences.value || []).map((item: ExperienceI
|
|||||||
data: {
|
data: {
|
||||||
label: item.title,
|
label: item.title,
|
||||||
subtitle: item.company,
|
subtitle: item.company,
|
||||||
years: `${item.startDate?.substring(0, 4)}-${item.endDate?.substring(0, 4)}`
|
years: `${item.startDate?.substring(0, 4) || ''}-${item.endDate?.substring(0, 4) || ''}`
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
background: '#10b981',
|
background: '#10b981',
|
||||||
|
|||||||
Reference in New Issue
Block a user