Skip to content

Commit

Permalink
fix: avoid error when referent openinHours is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Jul 22, 2021
1 parent f8b4812 commit 314fb4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function PointOfInterestCard(props) {
{day: item.openingHours.sunday_title, value: [item.openingHours.sunday_value], type: 'referent'},
]
setTimeTable([...timeTable]);
} else {
} else if (item.Horaires_Lundi) {
timeTable = [
{day: "Lundi", value: item.Horaires_Lundi.string.slice(0,2).map(k => k)},
{day: "Mardi", value: item.Horaires_Mardi.string.slice(0,2).map(k => k)},
Expand Down

0 comments on commit 314fb4d

Please sign in to comment.