From 4456a771fd624b3179d194f60a155ee85d3603c2 Mon Sep 17 00:00:00 2001 From: Pico2x Date: Mon, 12 Sep 2022 21:25:45 +0100 Subject: [PATCH] fix type error in update-metrics pt.2 --- functions/src/update-metrics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/update-metrics.ts b/functions/src/update-metrics.ts index eb5f6fd8..bb037e9c 100644 --- a/functions/src/update-metrics.ts +++ b/functions/src/update-metrics.ts @@ -187,7 +187,7 @@ export async function updateMetricsCore() { (e) => contractsById[e.contractId] ) const bets = groupContracts.map((e) => { - if (e.id in betsByContract) { + if (e != null && e.id in betsByContract) { return betsByContract[e.id] ?? [] } else { return []