diff --git a/src/shared/utils/challenge-listing/filter.js b/src/shared/utils/challenge-listing/filter.js index 8e48d395d1..7a67ea6db8 100644 --- a/src/shared/utils/challenge-listing/filter.js +++ b/src/shared/utils/challenge-listing/filter.js @@ -326,6 +326,10 @@ export function removeTrack(state, track) { }); } delete res.tracks[track]; + /* As was stated in the 'addTrack' function, selecting all tracks is the same as having + * no tracks field. So selecting no tracks should also be the same. Removing this line + * causes no challenges to be returned and flickering of the empty challenge listings. */ + if (_.isEmpty(res.tracks)) delete res.tracks; return res; }