File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 31
31
"lint:js" : " ./node_modules/.bin/eslint --ext .js,.jsx ." ,
32
32
"test" : " npm run lint && npm run jest"
33
33
},
34
- "version" : " 1.2.0 " ,
34
+ "version" : " 1.2.1 " ,
35
35
"dependencies" : {
36
36
"auth0-js" : " ^6.8.4" ,
37
37
"config" : " ^3.2.0" ,
Original file line number Diff line number Diff line change @@ -453,12 +453,15 @@ class ChallengesService {
453
453
*/
454
454
async getChallengeRegistrants ( challengeId ) {
455
455
/* If no token provided, resource will return Submitter role only */
456
- const roleId = this . private . tokenV3 ? await this . getRoleId ( 'Submitter' ) : '' ;
457
- const params = {
456
+ const roleId = this . private . tokenV3 ? await this . getRoleId ( 'Submitter' ) : null ;
457
+ let params = {
458
458
challengeId,
459
- roleId,
460
459
} ;
461
460
461
+ if ( roleId ) {
462
+ params = { ...params , roleId } ;
463
+ }
464
+
462
465
let registrants = await this . private . apiV5 . get ( `/resources?${ qs . stringify ( params ) } ` )
463
466
. then ( checkErrorV5 ) . then ( res => res . result ) ;
464
467
You can’t perform that action at this time.
0 commit comments