Skip to content

Commit

Permalink
Give critical error when skippedLastRoundsCount is not number
Browse files Browse the repository at this point in the history
  • Loading branch information
sbachinin committed Oct 9, 2024
1 parent 305311e commit 801e896
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/data/analyze_data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ export const ananlyze_data = (all_data) => {
}]
}

if (
typeof all_data.skippedLastRoundsCount !== 'undefined'
&& typeof all_data.skippedLastRoundsCount !== 'number'
) {
return [{
is_critical: true,
message: 'Data.skippedLastRoundsCount can only be a number',
data: all_data.skippedLastRoundsCount
}]
}

if (!all_data.rounds.length && !all_data.matches?.length) {
return [{
is_critical: true,
Expand Down

0 comments on commit 801e896

Please sign in to comment.