Fix type error in update metrics pt.3
This commit is contained in:
parent
5c6fe08bdb
commit
2a96ee98f4
|
@ -183,9 +183,9 @@ export async function updateMetricsCore() {
|
||||||
try {
|
try {
|
||||||
const groupUpdates = groups.map((group, index) => {
|
const groupUpdates = groups.map((group, index) => {
|
||||||
const groupContractIds = contractsByGroup[index] as GroupContractDoc[]
|
const groupContractIds = contractsByGroup[index] as GroupContractDoc[]
|
||||||
const groupContracts = groupContractIds.map(
|
const groupContracts = groupContractIds
|
||||||
(e) => contractsById[e.contractId]
|
.map((e) => contractsById[e.contractId])
|
||||||
)
|
.filter((e) => e !== undefined) as Contract[]
|
||||||
const bets = groupContracts.map((e) => {
|
const bets = groupContracts.map((e) => {
|
||||||
if (e != null && e.id in betsByContract) {
|
if (e != null && e.id in betsByContract) {
|
||||||
return betsByContract[e.id] ?? []
|
return betsByContract[e.id] ?? []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user