We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab083bc commit bf170f9Copy full SHA for bf170f9
1 file changed
src/widgets/booking/lib/useSeatState.ts
@@ -47,7 +47,7 @@ export function usePrefetchAllSeats() {
47
const layout = getSeatLayout(section);
48
const transformedSeats: Seat[] = layout.seats.map((seat, index) => ({
49
...seat,
50
- status: sectionSeats[index] ? SEAT_STATUS.AVAILABLE : SEAT_STATUS.UNAVAILABLE,
+ status: (index < sectionSeats.length && sectionSeats[index]) ? SEAT_STATUS.AVAILABLE : SEAT_STATUS.UNAVAILABLE,
51
}));
52
53
queryClient.setQueryData(seatQueryKeys.seatState(section), transformedSeats);
0 commit comments