Fix weird new crash in updateMetrics: contract.id missing?
This commit is contained in:
parent
e4f46c48f1
commit
9dd23b4a08
|
@ -55,7 +55,9 @@ export const updateMetricsCore = async () => {
|
|||
|
||||
const now = Date.now()
|
||||
const betsByContract = groupBy(bets, (bet) => bet.contractId)
|
||||
const contractUpdates = contracts.map((contract) => {
|
||||
const contractUpdates = contracts
|
||||
.filter((contract) => contract.id)
|
||||
.map((contract) => {
|
||||
const contractBets = betsByContract[contract.id] ?? []
|
||||
return {
|
||||
doc: firestore.collection('contracts').doc(contract.id),
|
||||
|
|
Loading…
Reference in New Issue
Block a user