CASH-845 add null protection

This commit is contained in:
AdamCaouetteSafelite 2025-07-18 08:46:51 -04:00
parent 819e1df086
commit adb7dd9bed

View file

@ -468,7 +468,7 @@ export default {
return store.getters.order.customer?.waitListRequested;
},
autoSelectTimeSlotIfOnlyOneIsAvailable() {
const numberOfOptions = this.timeSlotsForSelectedDate.timeSlots?.length;
const numberOfOptions = this.timeSlotsForSelectedDate?.timeSlots?.length;
if (numberOfOptions === 1) {
if (this.availableTimeSlots.length > 0) {
this.selectedAnswerForTimeSlots = this.availableTimeSlots[0].value;