From f91a48e4f621fa8ea7c0796cdfa94ee5dd7cfdba Mon Sep 17 00:00:00 2001 From: moon Date: Tue, 10 Sep 2024 14:15:56 -0700 Subject: [PATCH] handle null case --- src/providers/boredom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/boredom.ts b/src/providers/boredom.ts index 775e826eab..dc9febcc03 100644 --- a/src/providers/boredom.ts +++ b/src/providers/boredom.ts @@ -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,