Skip to content

Commit f91a48e

Browse files
committed
handle null case
1 parent cbb443a commit f91a48e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/boredom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const boredom: Provider = {
251251

252252
const boredomLevel = boredomLevels
253253
.filter((level) => boredomScore >= level.minScore)
254-
.pop();
254+
.pop() || boredomLevels[0];
255255

256256
const randomIndex = Math.floor(
257257
Math.random() * boredomLevel.statusMessages.length,

0 commit comments

Comments
 (0)