We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 323185d commit ee340f4Copy full SHA for ee340f4
1 file changed
frontend/src/ts/test/words-generator.ts
@@ -693,7 +693,7 @@ export async function getNextWord(
693
wordIndex: number,
694
wordsBound: number,
695
previousWord: string,
696
- previousWord2: string
+ previousWord2: string | undefined
697
): Promise<GetNextWordReturn> {
698
console.debug("Getting next word", {
699
isRepeated: TestState.isRepeated,
@@ -750,7 +750,7 @@ export async function getNextWord(
750
let randomWord = currentWordset.randomWord(funboxFrequency);
751
const previousWordRaw = previousWord.replace(/[.?!":\-,]/g, "").toLowerCase();
752
const previousWord2Raw = previousWord2
753
- .replace(/[.?!":\-,']/g, "")
+ ?.replace(/[.?!":\-,']/g, "")
754
.toLowerCase();
755
756
if (currentSection.length === 0) {
0 commit comments