From f5718e00d0b5a4d82e2a7aff3af0a444aefb2cec Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Wed, 15 Jul 2020 18:24:06 -0300 Subject: [PATCH 1/2] Fix Issue-4648 : Different data type compare --- src/services/challenges.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/challenges.js b/src/services/challenges.js index 32861093..5c453f66 100644 --- a/src/services/challenges.js +++ b/src/services/challenges.js @@ -363,7 +363,7 @@ class ChallengesService { /* Prepare data to logged user */ if (memberId) { - isRegistered = _.some(registrants, r => r.memberId === memberId); + isRegistered = _.some(registrants, r => `${r.memberId}` === `${memberId}`); const subParams = { challengeId, @@ -381,7 +381,7 @@ class ChallengesService { // Add submission date to registrants registrants.forEach((r, i) => { - const submission = submissions.find(s => s.memberId === Number(r.memberId)); + const submission = submissions.find(s => `${s.memberId}` === `${r.memberId}`); if (submission) { registrants[i].submissionDate = submission.created; } From 7d03e5a8dfa79afa86d4c2a035ee24981f09c2de Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Wed, 15 Jul 2020 18:26:38 -0300 Subject: [PATCH 2/2] Fix snapshot related with issue-4552 --- __tests__/__snapshots__/index.js.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index f1c7c70a..14a33782 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -303,6 +303,7 @@ Object { "SUBMISSION_END_DATE": "submissionEndDate", }, "default": undefined, + "fixColorStyle": [Function], "getService": [Function], "normalizeChallenge": [Function], },