Skip to content

Commit

Permalink
fix(labeler.js): Label bus routes by default if labeledModes not prov…
Browse files Browse the repository at this point in the history
…ided.
  • Loading branch information
binh-dam-ibigroup committed May 28, 2021
1 parent 49a8dc4 commit f155c30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/labeler/labeler.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ export default class Labeler {
})
})

// Generate labels for GTFS route/mode types listed in labeledModes.
// Generate labels for GTFS route/mode types listed in labeledModes if provided.
// If labeled modes is not provided, only label the buses (mode '3').
var edgeGroups = []
const labeledModes = this.transitive.options.labeledModes
const busModes = [3]
const labeledModes = this.transitive.options.labeledModes || busModes
forEach(this.transitive.network.paths, path => {
forEach(path.segments, segment => {
if (segment.type === 'TRANSIT' && labeledModes.includes(segment.getMode())) {
Expand Down

0 comments on commit f155c30

Please sign in to comment.