Skip to content

Commit

Permalink
fix(timetable): always default to pattern stop index for trip stop se…
Browse files Browse the repository at this point in the history
…quences
  • Loading branch information
landonreed committed Jul 13, 2018
1 parent d313e05 commit abd0f34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/editor/components/timetable/TimetableEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export default class TimetableEditor extends Component {
objectPath.set(newRow, `stopTimes.${i}.departureTime`, cumulativeTravelTime)
objectPath.set(newRow, `stopTimes.${i}.timepoint`, stop.timepoint || 0)
objectPath.set(newRow, `stopTimes.${i}.shapeDistTraveled`, stop.shapeDistTraveled)
objectPath.set(newRow, `stopTimes.${i}.stopSequence`, stop.stopSequence)
// Use pattern stop index to set stop sequence. Stop sequences should all
// be zero-based and incrementing in the editor, but in the case that
// they're not (e.g., due to a bad import) simply default to the index.
objectPath.set(newRow, `stopTimes.${i}.stopSequence`, i)
// }
}
for (let i = 0; i < this.props.timetable.columns.length; i++) {
Expand Down

0 comments on commit abd0f34

Please sign in to comment.