File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
lib/editor/components/timetable Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,10 @@ export default class TimetableEditor extends Component {
116116 objectPath . set ( newRow , `stopTimes.${ i } .departureTime` , cumulativeTravelTime )
117117 objectPath . set ( newRow , `stopTimes.${ i } .timepoint` , stop . timepoint || 0 )
118118 objectPath . set ( newRow , `stopTimes.${ i } .shapeDistTraveled` , stop . shapeDistTraveled )
119- objectPath . set ( newRow , `stopTimes.${ i } .stopSequence` , stop . stopSequence )
119+ // Use pattern stop index to set stop sequence. Stop sequences should all
120+ // be zero-based and incrementing in the editor, but in the case that
121+ // they're not (e.g., due to a bad import) simply default to the index.
122+ objectPath . set ( newRow , `stopTimes.${ i } .stopSequence` , i )
120123 // }
121124 }
122125 for ( let i = 0 ; i < this . props . timetable . columns . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments