This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -500,16 +500,18 @@ async function mapTimelineTemplateId (trackId, typeId) {
500
500
* @returns {Object } v5ChallengeObject
501
501
*/
502
502
async function buildV5Challenge ( legacyId , challengeListing , challengeDetails ) {
503
- if ( ! challengeListing ) {
503
+ if ( ! challengeListing || challengeListing === null ) {
504
+ logger . debug ( `Challenge listing not passed, pulling from V4ES for ${ legacyId } ` )
504
505
const challengeListingObj = await getChallengeListingFromV4ES ( legacyId )
505
506
challengeListing = challengeListingObj . data
506
507
}
507
- if ( ! challengeDetails ) {
508
+ if ( ! challengeDetails || challengeDetails === null ) {
509
+ logger . debug ( `Challenge details not passed, pulling from V4ES for ${ legacyId } ` )
508
510
const challengeDetailObj = await getChallengeDetailFromV4ES ( legacyId )
509
511
challengeDetails = challengeDetailObj . data
510
512
}
511
513
512
- if ( ! challengeListing ) {
514
+ if ( ! challengeListing || challengeListing === null ) {
513
515
throw Error ( `Challenge Listing Not Found in v4 Index ${ JSON . stringify ( challengeListing ) } ` )
514
516
}
515
517
You can’t perform that action at this time.
0 commit comments