fix(word generator): quotes breaking when repeat quotes is enabled

This commit is contained in:
Miodec 2024-04-08 19:13:53 +02:00
parent 4514ad02ae
commit 1d79d87d89

View file

@ -583,7 +583,11 @@ async function generateQuoteWords(
sectionIndexes: [],
};
if (TestState.isRepeated) {
for (let i = 0; i < limit; i++) {
for (
let i = 0;
i < Math.min(limit, previousGetNextWordReturns.length);
i++
) {
const repeated = previousGetNextWordReturns[i];
if (repeated === undefined) {