Skip to content

Commit e42f65a

Browse files
Merge branch 'integration-v5-challenge-api' into issue-4575
2 parents 4bc24f2 + 4b5f5f3 commit e42f65a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
3232
"test": "npm run lint && npm run jest"
3333
},
34-
"version": "1000.19.51",
34+
"version": "1000.20.0",
3535
"dependencies": {
3636
"auth0-js": "^6.8.4",
3737
"config": "^3.2.0",

src/utils/challenge/filter.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,11 @@ function filterByUpcoming(challenge, state) {
180180
}
181181

182182
function filterByUsers(challenge, state) {
183-
if (!state.userChallenges) return true;
184-
return state.userChallenges.find(ch => challenge.id === ch);
183+
const userId = _.get(state, 'userId', null);
184+
if (userId) {
185+
return _.get(challenge, ['users', userId], false);
186+
}
187+
return true;
185188
}
186189

187190
/**

0 commit comments

Comments
 (0)