Skip to content

Commit

Permalink
fix(route-viewer): always fetch route type
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Apr 4, 2023
1 parent a8bfab6 commit ce84287
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/actions/apiV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ export function findRoutes() {
longName
shortName
mode
type
color
}
}
Expand All @@ -662,7 +663,10 @@ export function findRoutes() {
// To initialize the route viewer,
// convert the routes array to a dictionary indexed by route ids.
return routes.reduce(
(result, { agency, color, id, longName, mode, shortName }) => {
(
result,
{ agency, color, id, longName, mode, shortName, type }
) => {
result[id] = {
agencyId: agency.id,
agencyName: agency.name,
Expand All @@ -674,6 +678,7 @@ export function findRoutes() {
config?.routeModeOverrides
),
shortName,
type,
v2: true
}
return result
Expand Down

0 comments on commit ce84287

Please sign in to comment.