fix: guard projects and items mapping to prevent TypeError on button click
All checks were successful
Build frontend / build (push) Successful in 34s

This commit is contained in:
mouazkh
2026-01-13 21:48:14 +03:00
parent 88ab4119e8
commit 5cf1e54c58
4 changed files with 724 additions and 141 deletions

View File

@ -387,9 +387,12 @@ export default function DepartmentDetail8() {
"departmentDetail8.projectsTimeline.defaultProjects",
{ returnObjects: true }
);
const expertiseTexts = t("departmentDetail8.expertiseItems", {
const expertiseTextsRaw = t("departmentDetail8.expertiseItems", {
returnObjects: true,
});
const expertiseTexts = Array.isArray(expertiseTextsRaw)
? expertiseTextsRaw
: [];
const ui = t("departmentDetail8.ui", { returnObjects: true });
const backToMenu = t("departmentDetail8.backToMenu");
const scrollLabels = t("departmentDetail8.scroll", { returnObjects: true });