diff --git a/src/services/updateData.ts b/src/services/updateData.ts index 7ab23dd..3822d37 100644 --- a/src/services/updateData.ts +++ b/src/services/updateData.ts @@ -164,8 +164,14 @@ async function updateAverages() { point.floatField("stars", average.stars); } if (average.mistakes) { - point.intField("badCuts", average.mistakes.badCuts); - point.intField("missed", average.mistakes.missed); + point.intField( + "badCuts", + isNaN(average.mistakes.badCuts) ? 0 : average.mistakes.badCuts + ); + point.intField( + "missed", + isNaN(average.mistakes.missed) ? 0 : average.mistakes.missed + ); } if (average.rank) { point.intField("rank", average.rank);