Skip to content

Commit 896ebe0

Browse files
committed
refactor(timetable.js): Only validate arrival or depature time columns (more strict check)
1 parent da2ba04 commit 896ebe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/editor/selectors/timetable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const isCellValueInvalid = (
150150
let previousValue = null
151151
let previousIndex = colIndex - 1
152152
// Find previous stop time
153-
while (previousValue === null && previousIndex >= 0 && columns[previousIndex].type !== 'TEXT') {
153+
while (previousValue === null && previousIndex >= 0 && (columns[previousIndex].type === 'ARRIVAL_TIME' || columns[previousIndex].type === 'DEPARTURE_TIME')) {
154154
const previousCol = columns[previousIndex]
155155
previousValue = previousCol && row && objectPath.get(row, previousCol.key)
156156
previousIndex--

0 commit comments

Comments
 (0)