Skip to content

Commit

Permalink
Update useWorkshopsPage.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaYousefpourM authored Jan 14, 2025
1 parent cc38fbe commit 4515e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/workshops/useWorkshopsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export default function useWorkshopsPage() {
const presenters = [];
if (workshop.teachers) {
workshop.teachers.forEach((item) => {
presenters.push(teachersData.filter((el) => el.id === item)[0].name);
presenters.push(teachersData.filter((el) => el.id === item)?.[0]?.name);
});
} else {
workshop.presenters.forEach((item) => {
presenters.push(presenterData.filter((el) => el.id === item)[0].name);
presenters.push(presenterData.filter((el) => el.id === item)?.[0]?.name);
});
}
item.presenters = presenters;
Expand Down

0 comments on commit 4515e69

Please sign in to comment.