Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit dfd1419

Browse files
authored
fix: handle empty array (#58)
1 parent 2f0f640 commit dfd1419

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/features/checker/utils/mapApplicationsForOverviewPage.ts

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export function categorizeProjectReviews(
5656
applicationCounts.pending += 1;
5757
applicationCounts.total += 1;
5858

59+
if (!application.evaluations) {
60+
application.evaluations = [];
61+
}
62+
5963
// Separate evaluations into AI and non-AI
6064
const aiEvaluations = application.evaluations.filter(
6165
(evaluation) => evaluation.evaluator.toLowerCase() === AI_EVALUATOR_ADDRESS.toLowerCase(),

0 commit comments

Comments
 (0)