File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,6 @@ export function loadChallengesByPage (
140140 if ( filterSortBy ) {
141141 filters [ 'sortBy' ] = filterSortBy
142142 }
143- if ( userId ) {
144- filters [ 'memberId' ] = userId
145- }
146143 if ( filterSortOrder ) {
147144 filters [ 'sortOrder' ] = filterSortOrder
148145 }
@@ -153,6 +150,10 @@ export function loadChallengesByPage (
153150 filters [ 'projectId' ] = projectId
154151 } else if ( _ . isObject ( projectId ) && projectId . value > 0 ) {
155152 filters [ 'projectId' ] = projectId . value
153+ } else if ( userId ) {
154+ // Note that we only add the memberId field if *no* project ID is given,
155+ // so that the list of *all challenges shows only those that the member is on
156+ filters [ 'memberId' ] = userId
156157 }
157158
158159 if ( status === 'all' ) {
You can’t perform that action at this time.
0 commit comments