mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-27 16:24:41 +08:00
revert: sourcecode text change
This partially reverts commit 6be5578e8f
.
This commit is contained in:
parent
6be5578e8f
commit
03ed7c4a39
1 changed files with 2 additions and 2 deletions
|
@ -22235,7 +22235,7 @@ class WordGenerator extends Wordset {
|
|||
this.ngrams[prefix] = new CharDistribution();
|
||||
}
|
||||
this.ngrams[prefix].addChar(c);
|
||||
prefix = (prefix + c).slice(-prefixSize);
|
||||
prefix = (prefix + c).substr(-prefixSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22243,7 +22243,7 @@ class WordGenerator extends Wordset {
|
|||
randomWord() {
|
||||
let word = "";
|
||||
for (;;) {
|
||||
const prefix = word.slice(-prefixSize);
|
||||
const prefix = word.substr(-prefixSize);
|
||||
let charDistribution = this.ngrams[prefix];
|
||||
if (!charDistribution) {
|
||||
// This shouldn't happen if this.ngrams is complete. If it does
|
||||
|
|
Loading…
Reference in a new issue