Skip to content

Commit 4308177

Browse files
authored
Merge pull request #4689 from nursoltan-s/issue-4686
omit text field from filter object
2 parents 2cddfe0 + 2548b85 commit 4308177

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import PT from 'prop-types';
66
import SwitchWithLabel from 'components/SwitchWithLabel';
77
import { challenge as challengeUtils } from 'topcoder-react-lib';
88
import { COMPETITION_TRACKS as TRACKS } from 'utils/tc';
9+
import _ from 'lodash';
910

1011
import localStorage from 'localStorage';
1112
import ChallengeSearchBar from './ChallengeSearchBar';
@@ -53,7 +54,8 @@ export default function ChallengeFilters({
5354
const switchTrack = (track, on) => {
5455
const act = on ? Filter.addTrack : Filter.removeTrack;
5556
const filterObj = act(filterState, track);
56-
localStorage.setItem('trackStatus', JSON.stringify(filterObj));
57+
const newFilterObj = _.omit(filterObj, 'text');
58+
localStorage.setItem('trackStatus', JSON.stringify(newFilterObj));
5759
setFilterState(filterObj);
5860
};
5961

0 commit comments

Comments
 (0)