Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions utils/directions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,13 @@ async function handleShuttleRouting(
}
// if directTransit route is available, do early check to save time

if (directTransit !== null) {
if (
preShuttlePath.totalDurationSeconds + shuttleTransitTime >=
if (
directTransit !== null &&
preShuttlePath.totalDurationSeconds + shuttleTransitTime >=
directTransit.totalDurationSeconds
) {
console.log("direct transit route is faster than pre + shuttle");
return [];
}
) {
console.log("direct transit route is faster than pre + shuttle");
return [];
} else {
console.log("no direct transit route");
}
Expand Down
Loading