Skip to content

Commit

Permalink
fix(custom): crash when trying to start a custom text with a lot of s…
Browse files Browse the repository at this point in the history
…ections containing a lot of words
  • Loading branch information
Miodec committed Nov 25, 2024
1 parent a3916cb commit a5c9433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/ts/test/words-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ export async function generateWords(
const sectionFinishedAndOverLimit =
currentSection.length === 0 &&
sectionIndex >= CustomText.getLimitValue();
if (sectionFinishedAndOverLimit) {
if (sectionFinishedAndOverLimit || ret.words.length >= 100) {
stop = true;
}
} else if (ret.words.length >= limit) {
Expand Down

0 comments on commit a5c9433

Please sign in to comment.