From 117b3093ee4162ea50741a3c727eeabfddd66231 Mon Sep 17 00:00:00 2001 From: Bryann Yeap Kok Keong Date: Mon, 31 Oct 2022 03:09:22 +0800 Subject: [PATCH] [offers][fix] Fix bug where company analysis shows wrong company --- apps/portal/src/server/router/offers/offers-analysis-router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/portal/src/server/router/offers/offers-analysis-router.ts b/apps/portal/src/server/router/offers/offers-analysis-router.ts index 3009c1f3..b79432e9 100644 --- a/apps/portal/src/server/router/offers/offers-analysis-router.ts +++ b/apps/portal/src/server/router/offers/offers-analysis-router.ts @@ -339,7 +339,7 @@ export const offersAnalysisRouter = createRouter() (companyOffer) => { // TODO: Refactor calculating analysis into a function let similarCompanyOffers = similarOffers.filter( - (offer) => offer.companyId === overallHighestOffer.companyId, + (offer) => offer.companyId === companyOffer.companyId, ); const companyIndex = searchOfferPercentile(