Skip to content

Commit 8070cf0

Browse files
fix: allow to not have all days in time slot preferences
1 parent 7ef6642 commit 8070cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/domain/TimeSlot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class TimeSlot {
1919
}
2020

2121
isConvenient(timeSlotsPreferences) {
22-
return timeSlotsPreferences[this.dayOfWeek].includes(this.startTime);
22+
return timeSlotsPreferences[this.dayOfWeek]?.includes(this.startTime);
2323
}
2424

2525
isMoreConvenient(slotToCompare, timeSlotsPreferences) {

0 commit comments

Comments
 (0)