Skip to content

Commit 193bb43

Browse files
authoredAug 28, 2020
Update challenges.js
1 parent bb010f4 commit 193bb43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/services/challenges.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class ChallengesService {
328328
if (/^[\d]{5,8}$/.test(challengeId)) {
329329
isLegacyChallenge = true;
330330
challenge = await this.private.getChallenges('/challenges/', { legacyId: challengeId })
331-
.then(res => res.challenges);
331+
.then(res => res.challenges[0] || {});
332332
} else {
333333
challenge = await this.private.getChallenges(`/challenges/${challengeId}`)
334334
.then(res => res.challenges);

0 commit comments

Comments
 (0)
Please sign in to comment.