File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/component/itinerary/navigator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export default function NaviInstructions(
51
51
const remainingDuration = Math . max (
52
52
Math . ceil ( ( legTime ( start ) - time ) / 60000 ) ,
53
53
0 ,
54
- ) ; // ms to minutes
54
+ ) ; // ms to minutes, >= 0
55
55
const rt = nextLeg . realtimeState === 'UPDATED' ;
56
56
const values = {
57
57
duration : withRealTime ( rt , remainingDuration ) ,
@@ -104,7 +104,7 @@ export default function NaviInstructions(
104
104
: intl . formatMessage ( { id : 'navileg-from-stop' } ) ;
105
105
const localizedMode = getLocalizedMode ( leg . mode , intl ) ;
106
106
107
- const remainingDuration = Math . ceil ( ( t - time ) / 60000 ) ; // ms to minutes
107
+ const remainingDuration = Math . max ( Math . ceil ( ( t - time ) / 60000 ) , 0 ) ; // ms to minutes, >= 0
108
108
const values = {
109
109
stopOrStation,
110
110
stop : leg . to . stop . name ,
You can’t perform that action at this time.
0 commit comments