From 19d44ff1c8941090ee1c851e13a27a7a6a58d070 Mon Sep 17 00:00:00 2001 From: Antoine Arlaud Date: Fri, 10 May 2024 15:44:14 +0200 Subject: [PATCH] fix: compare contrib emails without case sensitivity --- src/lib/consolidateResults/consolidate.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/consolidateResults/consolidate.ts b/src/lib/consolidateResults/consolidate.ts index f5367e9..881c354 100644 --- a/src/lib/consolidateResults/consolidate.ts +++ b/src/lib/consolidateResults/consolidate.ts @@ -33,14 +33,15 @@ export const consolidateResults = async ( if ( consolidatedContriburosList.find( (item) => - item.contributor.email == isContributorInArray.contributor.email, + item.contributor.email.toLowerCase() == + isContributorInArray.contributor.email.toLowerCase(), ) ) { consolidatedContriburosList[ consolidatedContriburosList.findIndex( (item) => - item.contributor.email == - isContributorInArray.contributor.email, + item.contributor.email.toLowerCase() == + isContributorInArray.contributor.email.toLowerCase(), ) ] = isContributorInArray; } else {