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 (
140
140
if ( filterSortBy ) {
141
141
filters [ 'sortBy' ] = filterSortBy
142
142
}
143
- if ( userId ) {
144
- filters [ 'memberId' ] = userId
145
- }
146
143
if ( filterSortOrder ) {
147
144
filters [ 'sortOrder' ] = filterSortOrder
148
145
}
@@ -153,6 +150,10 @@ export function loadChallengesByPage (
153
150
filters [ 'projectId' ] = projectId
154
151
} else if ( _ . isObject ( projectId ) && projectId . value > 0 ) {
155
152
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
156
157
}
157
158
158
159
if ( status === 'all' ) {
You can’t perform that action at this time.
0 commit comments