Skip to content

Commit

Permalink
replace $set wtih $merge for FIND_STOP_TIMES_FOR_STOP
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed Oct 21, 2024
1 parent a8e5a5d commit ea63467
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/reducers/create-otp-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,9 @@ function createOtpReducer(config) {
return update(state, {
transitIndex: {
stops: {
$set: {
...state.transitIndex.stops,
$merge: {
[action.payload.stopId]: {
fetchStatus: FETCH_STATUS.FETCHING
fetchStatus: { $merge: FETCH_STATUS.FETCHING }
}
}
}
Expand All @@ -857,7 +856,7 @@ function createOtpReducer(config) {
return update(state, {
transitIndex: {
stops: {
$set: {
$merge: {
...state.transitIndex.stops,
[action.payload.stopId]: {
fetchStatus: FETCH_STATUS.FETCHING
Expand All @@ -871,10 +870,7 @@ function createOtpReducer(config) {
return update(state, {
transitIndex: {
stops: {
$set: {
...state.transitIndex.stops,
[action.payload.gtfsId]: action.payload
}
[action.payload.gtfsId]: { $merge: action.payload }
}
}
})
Expand Down

0 comments on commit ea63467

Please sign in to comment.