Skip to content

Commit

Permalink
fix(lib/api): Reset ui_itineraryView when settin active itin to -1.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Oct 4, 2023
1 parent 05deb14 commit 50ade14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/actions/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export function updateOtpUrlParams(state, searchId) {
params.ui_activeSearch = searchId
// Assumes this is a new search and the active itinerary should be reset.
params.ui_activeItinerary = -1
// At the same time, reset/delete the ui_itineraryView param.
params.ui_itineraryView = undefined
if (config.itinerary?.showFirstResultByDefault) {
dispatch(setVisibleItinerary({ index: 0 }))
}
Expand Down

0 comments on commit 50ade14

Please sign in to comment.