From da30ba1fc605a9d2fb1fa06a60408033118f0f6a Mon Sep 17 00:00:00 2001 From: GuillaumeSD Date: Fri, 20 Jun 2025 23:22:06 +0200 Subject: [PATCH] fix : filter out games without pgn --- src/lib/chessCom.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/chessCom.ts b/src/lib/chessCom.ts index e8b904d..73edcee 100644 --- a/src/lib/chessCom.ts +++ b/src/lib/chessCom.ts @@ -42,6 +42,7 @@ export const getChessComUserRecentGames = async ( } const gamesToReturn = games + .filter((game) => game.pgn && game.end_time) .sort((a, b) => b.end_time - a.end_time) .slice(0, 50) .map(formatChessComGame);