Fix check for _id as well as id during certification
This commit is contained in:
@ -31,7 +31,11 @@ function isCertified(frontEndIds, { completedChallenges, isFrontEndCert }) {
|
|||||||
if (isFrontEndCert) {
|
if (isFrontEndCert) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return _.every(frontEndIds, ({ id }) => _.some(completedChallenges, { id }));
|
return _.every(frontEndIds, ({ id }) => {
|
||||||
|
return _.some(completedChallenges, (challenge) => {
|
||||||
|
return challenge.id === id || challenge._id === id;
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function certificate(app) {
|
export default function certificate(app) {
|
||||||
|
Reference in New Issue
Block a user