Skip to content

Commit a5c9433

Browse files
committed
fix(custom): crash when trying to start a custom text with a lot of sections containing a lot of words
1 parent a3916cb commit a5c9433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/ts/test/words-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ export async function generateWords(
663663
const sectionFinishedAndOverLimit =
664664
currentSection.length === 0 &&
665665
sectionIndex >= CustomText.getLimitValue();
666-
if (sectionFinishedAndOverLimit) {
666+
if (sectionFinishedAndOverLimit || ret.words.length >= 100) {
667667
stop = true;
668668
}
669669
} else if (ret.words.length >= limit) {

0 commit comments

Comments
 (0)