From 943643251f3a447de15822041e985a999f402eb1 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Fri, 7 Apr 2023 10:59:40 -0500 Subject: [PATCH] Add additional stories --- main.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cjs b/main.cjs index 1f02dbd..59bc638 100644 --- a/main.cjs +++ b/main.cjs @@ -275,7 +275,7 @@ global.madlibNextPrompt = function madlibNextPrompt(client, iteration, selectedS let vowelArray = ["a", "e", "i", "o", "u"]; aAn = "a "; for (let i = 0; i < vowelArray.length; ++i) { - if (phrase[iteration].toLowerCase().startsWith(vowelArray)) { + if (phrase[iteration].toLowerCase().charAt(0) == (vowelArray[i].charAt(0))) { aAn = "an "; } }