-
Notifications
You must be signed in to change notification settings - Fork 90
Fix timetable previous stop time checks from checking text columns. #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0de00c6
da2ba04
896ebe0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,3 +28,6 @@ env.yml-original | |
| .env | ||
| !configurations/test/env.yml | ||
| scripts/*client.json | ||
|
|
||
| # Vs code settings | ||
| .vscode | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,12 @@ import objectPath from 'object-path' | |
|
|
||
| import { getAbbreviatedStopName, getTableById } from '../util/gtfs' | ||
| import { isTimeFormat } from '../util/timetable' | ||
|
|
||
| import type { | ||
| GtfsStop, | ||
| Pattern, | ||
| TimetableColumn, | ||
| Trip | ||
| } from '../../types' | ||
|
|
||
| import type { AppState } from '../../types/reducers' | ||
| import type { EditorValidationIssue } from '../util/validation' | ||
|
|
||
|
|
@@ -152,7 +150,7 @@ const isCellValueInvalid = ( | |
| let previousValue = null | ||
| let previousIndex = colIndex - 1 | ||
| // Find previous stop time | ||
| while (previousValue === null && previousIndex >= 0) { | ||
| while (previousValue === null && previousIndex >= 0 && columns[previousIndex].type !== 'TEXT') { | ||
|
||
| const previousCol = columns[previousIndex] | ||
| previousValue = previousCol && row && objectPath.get(row, previousCol.key) | ||
| previousIndex-- | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit I'd add a trailing slash here to make it clear it's a folder!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit could be a great marvel character, you may want to trademark that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in da2ba04