Be robust to ridiculous bet IDs on dev

This commit is contained in:
Marshall Polaris 2022-09-04 13:49:28 -07:00
parent ac3fa1722d
commit d573c7dbca

View File

@ -19,7 +19,7 @@ async function getBetComments(transaction: Transaction) {
const allComments = await transaction.get(
firestore.collectionGroup('comments')
)
const betComments = allComments.docs.filter((d) => d.get('betId') != null)
const betComments = allComments.docs.filter((d) => d.get('betId'))
log(`Found ${betComments.length} comments associated with bets.`)
return betComments
}