diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index d16a52544..8ead98a58 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1677,14 +1677,14 @@ export class PortfolioService { ): PortfolioReportResponse['statistics'] { const rulesActiveCount = Object.values(evaluatedRules) .flat() - .filter(({ isActive }) => { - return isActive === true; + .filter((rule) => { + return rule?.isActive === true; }).length; const rulesFulfilledCount = Object.values(evaluatedRules) .flat() - .filter(({ value }) => { - return value === true; + .filter((rule) => { + return rule?.value === true; }).length; return { rulesActiveCount, rulesFulfilledCount };