Skip to content

Commit 0d9c956

Browse files
allow stop times with same times for flex
1 parent facb8cc commit 0d9c956

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/editor/selectors/timetable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ const isCellValueInvalid = (
157157
tripIds: Array<string>
158158
): ?EditorValidationIssue => {
159159
const col = columns[colIndex]
160+
const isFlexInvolved = columns.some(isFlexStopTime)
160161

161162
if (isTimeFormat(col.type)) {
162163
// FIXME: This does not yet support validating frequency start/end times.
@@ -176,7 +177,7 @@ const isCellValueInvalid = (
176177
// Ensure value is increasing over previous value
177178
// Flexible stop times (because intra zonal trips are represented by a duplicate stop time) can
178179
// include the same start and end pickup times back to back and so must avoid this check.
179-
const isInvalid = !isFlexStopTime(col) && val < previousValue
180+
const isInvalid = !isFlexInvolved && val < previousValue
180181
return isInvalid
181182
? {
182183
field: col.key,

0 commit comments

Comments
 (0)