File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ export class PolyglotWordset extends Wordset {
161161 this . wordsMap = wordsMap ;
162162 this . resetIndexes ( ) ;
163163 this . length = Array . from ( this . wordsMap . values ( ) ) . reduce (
164- ( sum , ws ) => sum + ws . words . length ,
164+ ( sum , ws ) => sum + ws . length ,
165165 0 ,
166166 ) ;
167167 this . currLang = this . langs [ 0 ] as Language ;
@@ -172,7 +172,7 @@ export class PolyglotWordset extends Wordset {
172172 }
173173
174174 override resetIndexes ( ) : void {
175- this . wordsMap . forEach ( ( ws , _ ) => {
175+ this . wordsMap . forEach ( ( ws ) => {
176176 ws . resetIndexes ( ) ;
177177 } ) ;
178178 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class Wordset {
2525
2626 randomWord ( mode : FunboxWordsFrequency ) : string {
2727 if ( mode === "zipf" ) {
28- return this . words [ zipfyRandomArrayIndex ( this . words . length ) ] as string ;
28+ return this . words [ zipfyRandomArrayIndex ( this . length ) ] as string ;
2929 } else {
3030 return randomElementFromArray ( this . words ) ;
3131 }
You can’t perform that action at this time.
0 commit comments