From 107c127f7e72b51a36ce39d84d0af90447d8ecf2 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 16 May 2020 11:49:40 +0100 Subject: [PATCH] fixed a tiny bug where capital I would not be removed if punctuation mode is off --- public/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/script.js b/public/js/script.js index 98cebe797..6e1d56423 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -86,7 +86,7 @@ function initWords() { for (let i = 1; i < wordsBound; i++) { randomWord = words[Math.floor(Math.random() * words.length)]; previousWord = wordsList[i - 1]; - while (randomWord == previousWord && (!config.punctuation && "I")) { + while (randomWord == previousWord && (!config.punctuation && randomWord == "I")) { randomWord = words[Math.floor(Math.random() * words.length)]; } wordsList.push(randomWord);