Skip to content

Commit 1493d17

Browse files
fix(editor/util/gtfs): include route_desc in entity name
1 parent 783ece9 commit 1493d17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/editor/util/gtfs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow
22

33
import {latLngBounds} from 'leaflet'
4+
45
import {getGtfsSpec} from '../../common/util/config'
56
import {
67
generateUID,
@@ -9,7 +10,6 @@ import {
910
idealTextColor
1011
} from '../../common/util/util'
1112
import {getEntityTableString} from '../../gtfs/util'
12-
1313
import type {
1414
// EditorTableData,
1515
Entity,
@@ -260,6 +260,9 @@ export function getEntityName (entity: any): string {
260260
route.route_long_name !== '""') {
261261
return `${route.route_short_name} - ${route.route_long_name}`
262262
} else if (route.route_short_name && route.route_short_name !== '""') {
263+
if (route.route_desc && route.route_desc !== '""') {
264+
return `${route.route_short_name} - ${route.route_desc}`
265+
}
263266
return route.route_short_name
264267
} else if (route.route_long_name && route.route_long_name !== '""') {
265268
return route.route_long_name

0 commit comments

Comments
 (0)