From 815369805af4c82c87b7b28605214c932adae4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:11:04 -0500 Subject: [PATCH] fix: null rating type safety --- scripts/buildRatingLeaderboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildRatingLeaderboard.ts b/scripts/buildRatingLeaderboard.ts index 58eb834bd..7c4d2b698 100644 --- a/scripts/buildRatingLeaderboard.ts +++ b/scripts/buildRatingLeaderboard.ts @@ -134,7 +134,7 @@ for (const leaderboardChunk of chunk(leaderboard, 100)) { stats.forEach((stat, index) => { const trueIndex = chunkIndex * 100 + index; comprehensiveLeaderboard[trueIndex] = - leaderboardChunk[index].id === 0 || stat.statistics.rating === undefined + leaderboardChunk[index].id === 0 || stat?.statistics.rating === undefined ? { battles: 0, damage: 0,