mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 02:39:05 +08:00
fix(words generator): unnecessairly lowercasing words when funboxes alter word generation
fixes ascii not having capital letters
This commit is contained in:
parent
44fbf62282
commit
8e38eae9bc
1 changed files with 6 additions and 1 deletions
|
|
@ -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" &&
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue