Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bef4b6a

Browse files
committedApr 7, 2022
fix(timetable): Allow offsetting by 24hrs or more
1 parent b5d4237 commit bef4b6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/editor/reducers/timetable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import clone from 'lodash/cloneDeep'
77
import { sortAndFilterTrips } from '../util'
88
import { isTimeFormat } from '../util/timetable'
99
import {resequenceStops} from '../util/map'
10-
1110
import type {Action} from '../../types/actions'
1211
import type {TimetableState} from '../../types/reducers'
1312

@@ -98,7 +97,8 @@ const timetable = (state: TimetableState = defaultState, action: Action): Timeta
9897
const path = `${action.payload.rowIndexes[i]}.${col.key}`
9998
if (isTimeFormat(col.type)) {
10099
const currentVal = objectPath.get(trips, path)
101-
const value = currentVal + (action.payload.offset % 86399) // ensure seconds does not exceed 24 hours
100+
// Arrival time can be > 24 hours for service day, so do not block offsetting by 24 hours.
101+
const value = currentVal + action.payload.offset
102102
objectPath.set(trips, path, value)
103103
}
104104
}

0 commit comments

Comments
 (0)
Please sign in to comment.