Skip to content

Commit 7810afc

Browse files
author
Sachin Maheshwari
committed
fixing typo
1 parent 83490b3 commit 7810afc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/common/broadcastAPIHelper.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,19 @@ async function checkUserSkillsAndTracks(userId, bulkMessage) {
130130
//
131131
if (tracks.length > 0) {
132132
trackMatch = false
133-
const uDevChallenges = _.get(m[0], "stats[0].DEVELOP.challenges1")
134-
const uDesignChallenges = _.get(m[0], "stats[0].DEVELOP.challenges")
135-
const uDSChallenges = _.get(m[0], "stats[0].DEVELOP.challenges")
133+
const uDevChallenges = _.get(m[0], "stats[0].DEVELOP.challenges")
134+
const uDesignChallenges = _.get(m[0], "stats[0].DESIGN.challenges")
135+
const uDSChallenges = _.get(m[0], "stats[0].DATA_SCIENCE.challenges")
136136
_.map(tracks, (t) => {
137137
/**
138138
* checking if user participated in specific challenges
139139
*/
140-
if (t.equalsIgnoreCase("DEVELOP")) {
140+
let key = t.toLowerCase()
141+
if (key === "develop") {
141142
trackMatch = uDevChallenges > 0 ? true : trackMatch
142-
} else if (t.equalsIgnoreCase("DESIGN")) {
143+
} else if (key === "design") {
143144
trackMatch = uDesignChallenges > 0 ? true : trackMatch
144-
} else if (t.equalsIgnoreCase("DATA_SCIENCE")) {
145+
} else if (key === "data_science") {
145146
trackMatch = uDSChallenges > 0 ? true : trackMatch
146147
}
147148
})

0 commit comments

Comments
 (0)