Skip to content

Commit bf170f9

Browse files
zaewcCopilot
andauthored
Update src/widgets/booking/lib/useSeatState.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ab083bc commit bf170f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/widgets/booking/lib/useSeatState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function usePrefetchAllSeats() {
4747
const layout = getSeatLayout(section);
4848
const transformedSeats: Seat[] = layout.seats.map((seat, index) => ({
4949
...seat,
50-
status: sectionSeats[index] ? SEAT_STATUS.AVAILABLE : SEAT_STATUS.UNAVAILABLE,
50+
status: (index < sectionSeats.length && sectionSeats[index]) ? SEAT_STATUS.AVAILABLE : SEAT_STATUS.UNAVAILABLE,
5151
}));
5252

5353
queryClient.setQueryData(seatQueryKeys.seatState(section), transformedSeats);

0 commit comments

Comments
 (0)