Skip to content

Commit

Permalink
Fix infinite loading when timetable is in halt status
Browse files Browse the repository at this point in the history
  • Loading branch information
Taewan-P committed Sep 15, 2024
1 parent 2c06256 commit 26e25d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/components/shuttle/Shuttle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ export const Shuttle = ({ location }: ShuttleStop) => {
const timetable = useQuery({
queryKey: ['shuttle', season, week, location],
queryFn: () => {
if (season === null || week === null) {
if (
season === null ||
week === null ||
season === seasonKeys.HALT ||
week === weekKeys.UNKNOWN
) {
return Array<SingleShuttleSchedule>()
}
return getTimetable(season, week, location)
Expand Down

0 comments on commit 26e25d0

Please sign in to comment.