fix: guard optional objectives/technologies fields at type and render layer

This commit is contained in:
2026-04-19 12:57:03 +02:00
parent 7285dfd74d
commit efadaa6918
4 changed files with 15 additions and 11 deletions

View File

@@ -153,9 +153,9 @@ function ExperienceCard({
<span>{duration}</span>
</div>
{exp.objectives.length > 0 && (
{(exp.objectives ?? []).length > 0 && (
<ul className="mb-3 ml-0 list-none space-y-1.5 p-0">
{exp.objectives.map((obj) => (
{(exp.objectives ?? []).map((obj) => (
<li
key={obj.id}
className="flex gap-2 text-sm text-[var(--sea-ink-soft)]"
@@ -167,9 +167,9 @@ function ExperienceCard({
</ul>
)}
{exp.technologies.length > 0 && (
{(exp.technologies ?? []).length > 0 && (
<div className="flex flex-wrap gap-1.5">
{exp.technologies.map((tech) => (
{(exp.technologies ?? []).map((tech) => (
<TechChip key={tech.id} label={tech.name} />
))}
</div>