From a9f04b99d1852b9beed59cc579f5d50ce2bd495c Mon Sep 17 00:00:00 2001 From: regalijan Date: Fri, 20 Oct 2023 12:24:04 -0400 Subject: [PATCH] Fall back to zero as a default value on game appeals --- components/GameAppealCard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/GameAppealCard.tsx b/components/GameAppealCard.tsx index 4a24d95..2a5f9d2 100644 --- a/components/GameAppealCard.tsx +++ b/components/GameAppealCard.tsx @@ -26,7 +26,8 @@ export default function (props: GameAppealProps) { async function performAction(action: "accept" | "deny"): Promise { setLoading(true); const statsReduction = parseInt( - (document.getElementById("reductPercentage") as HTMLInputElement).value, + (document.getElementById("reductPercentage") as HTMLInputElement | null) + ?.value ?? "0", ); const actionResponse = await fetch(