diff --git a/src/utils/challenge/filter.js b/src/utils/challenge/filter.js index 263c3132..d662a230 100644 --- a/src/utils/challenge/filter.js +++ b/src/utils/challenge/filter.js @@ -173,8 +173,11 @@ function filterByUpcoming(challenge, state) { } function filterByUsers(challenge, state) { - if (!state.userChallenges) return true; - return state.userChallenges.find(ch => challenge.id === ch); + const userId = _.get(state, 'userId', null); + if (userId) { + return _.get(challenge, ['users', userId], false); + } + return true; } /**