From 4c6d43b50d72de5703e96b665c2b2bfd92a332f7 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 18 May 2022 11:34:40 -0400 Subject: [PATCH] handle undefined allOutcomeShares --- common/calculate-dpm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/calculate-dpm.ts b/common/calculate-dpm.ts index 9c9de420..efd0268d 100644 --- a/common/calculate-dpm.ts +++ b/common/calculate-dpm.ts @@ -260,7 +260,7 @@ export function calculateStandardDpmPayout( if (!isNumeric && betOutcome !== outcome) return 0 const shares = isNumeric - ? (bet as NumericBet).allOutcomeShares[outcome] + ? ((bet as NumericBet).allOutcomeShares ?? {})[outcome] : bet.shares if (!shares) return 0