fix: delta stuff

This commit is contained in:
zkldi
2023-01-31 15:56:29 +00:00
parent b3a9f94a7c
commit c7516c4d7a
@@ -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);