From 948d87822298bf95a30bf0c0e77e00354c11061b Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 10 May 2022 23:01:07 -0400 Subject: [PATCH] Prevent 500 error on markets with no collected fees --- web/components/contract/contract-info-dialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/contract/contract-info-dialog.tsx b/web/components/contract/contract-info-dialog.tsx index db3fefa6..68921347 100644 --- a/web/components/contract/contract-info-dialog.tsx +++ b/web/components/contract/contract-info-dialog.tsx @@ -87,7 +87,7 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { Creator earnings - {formatMoney(contract.collectedFees.creatorFee)} + {formatMoney(contract.collectedFees?.creatorFee ?? 0)}