Skip to content

Commit

Permalink
prevent removal of ticket search mode on clear (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
houbly authored May 20, 2021
1 parent 97d90b2 commit 9107c05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/globalState/AutoCompleteContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ export const AutoCompleteProvider = (props) => {
// Used to reset everything
case 'RESET_SELECTED_SERVICES':
getAllSearchParams().forEach((param) => {
delSearchParam(param.name);
if (param.name !== 'ticketSearch') {
delSearchParam(param.name);
}
});
return {
...initialState,
mapRef: state.mapRef,
queries: initialState.queries,
selectedStations: initialState.selectedStations,
};
// Default should return intial state if error
default:
Expand Down

0 comments on commit 9107c05

Please sign in to comment.