Skip to content

Commit

Permalink
fix(editor/util/gtfs): include route_desc in entity name
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Dec 7, 2021
1 parent 783ece9 commit 1493d17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/editor/util/gtfs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import {latLngBounds} from 'leaflet'

import {getGtfsSpec} from '../../common/util/config'
import {
generateUID,
Expand All @@ -9,7 +10,6 @@ import {
idealTextColor
} from '../../common/util/util'
import {getEntityTableString} from '../../gtfs/util'

import type {
// EditorTableData,
Entity,
Expand Down Expand Up @@ -260,6 +260,9 @@ export function getEntityName (entity: any): string {
route.route_long_name !== '""') {
return `${route.route_short_name} - ${route.route_long_name}`
} else if (route.route_short_name && route.route_short_name !== '""') {
if (route.route_desc && route.route_desc !== '""') {
return `${route.route_short_name} - ${route.route_desc}`
}
return route.route_short_name
} else if (route.route_long_name && route.route_long_name !== '""') {
return route.route_long_name
Expand Down

0 comments on commit 1493d17

Please sign in to comment.