Skip to content

Commit

Permalink
firestore doesn't like undefined updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed May 6, 2024
1 parent 38665bf commit 2697f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ export async function moderateComments(
for (const [puzzleId, dbPuzzle] of Object.entries(puzzles)) {
await getCollection('c')
.doc(puzzleId)
.update(toFirestore({ cs: dbPuzzle.cs, lk: dbPuzzle.lk }));
.update(toFirestore({ cs: dbPuzzle.cs || [], lk: dbPuzzle.lk || [] }));
}
}

0 comments on commit 2697f74

Please sign in to comment.