diff --git a/client/src/components/user/UGPTStatShowcase.tsx b/client/src/components/user/UGPTStatShowcase.tsx index 29d07bcd8..3f8a4f2ee 100644 --- a/client/src/components/user/UGPTStatShowcase.tsx +++ b/client/src/components/user/UGPTStatShowcase.tsx @@ -264,8 +264,8 @@ function StatDelta({ game, playtype, }: { - v1: number; - v2?: number; + v1: number | null; + v2?: number | null; mode: "folder" | "chart"; metric: string; game: Game; @@ -277,6 +277,11 @@ function StatDelta({ v2 = 0; } + if (v1 === null) { + // eslint-disable-next-line no-param-reassign + v1 = 0; + } + const formattedV2 = FormatValue(game, playtype, mode, property, v2); const d = FormatValue(game, playtype, mode, property, v2 - v1);