Skip to content

Commit

Permalink
fix(words generator): unnecessairly lowercasing words when funboxes a…
Browse files Browse the repository at this point in the history
…lter word generation

fixes ascii not having capital letters
  • Loading branch information
Miodec committed Jan 2, 2025
1 parent 44fbf62 commit 8e38eae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/ts/test/words-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,10 @@ export async function getNextWord(
throw new WordGenError("Random word contains spaces");
}

const usingFunboxWithGetWord = getActiveFunboxes().some(
(fb) => fb.functions?.getWord
);

if (
Config.mode !== "custom" &&
Config.mode !== "quote" &&
Expand All @@ -873,7 +877,8 @@ export async function getNextWord(
!Config.language.startsWith("swiss_german") &&
!Config.language.startsWith("code") &&
!Config.language.startsWith("klingon") &&
!isCurrentlyUsingFunboxSection
!isCurrentlyUsingFunboxSection &&
!usingFunboxWithGetWord
) {
randomWord = randomWord.toLowerCase();
}
Expand Down

0 comments on commit 8e38eae

Please sign in to comment.