Skip to content

Commit

Permalink
dont calculate seconds if travel time is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Mar 26, 2024
1 parent c57753f commit 33e74b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/travelTimeQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export class TravelTimeQuery {
record.set('hoursInRange', this.hoursInRange)
record.set('estimatedVehicleCount', this.#estimatedSample)
record.set('mean_travel_time_minutes', this.#travelTime)
record.set('mean_travel_time_seconds', 60* this.#travelTime)
record.set(
'mean_travel_time_seconds',
this.#travelTime ? 60 * this.#travelTime : null
)

if(type=='json'){
return Object.fromEntries(record) // can't JSONify maps
Expand Down

0 comments on commit 33e74b6

Please sign in to comment.