handle undefined allOutcomeShares

This commit is contained in:
mantikoros 2022-05-18 11:34:40 -04:00
parent 3344218fbb
commit 4c6d43b50d

View File

@ -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