Skip to content

Commit

Permalink
handle null case
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Sep 10, 2024
1 parent cbb443a commit f91a48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/boredom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const boredom: Provider = {

const boredomLevel = boredomLevels
.filter((level) => boredomScore >= level.minScore)
.pop();
.pop() || boredomLevels[0];

const randomIndex = Math.floor(
Math.random() * boredomLevel.statusMessages.length,
Expand Down

0 comments on commit f91a48e

Please sign in to comment.