Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/src/ts/test/test-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ export function removeAfkData(): void {
const testSeconds = calculateTestSeconds();
TestInput.keypressCountHistory.splice(testSeconds);
TestInput.wpmHistory.splice(testSeconds);
TestInput.burstHistory.splice(testSeconds);
TestInput.rawHistory.splice(testSeconds);
}

Expand Down
13 changes: 5 additions & 8 deletions frontend/src/ts/test/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1324,14 +1324,11 @@ async function loadWordsHistory(): Promise<boolean> {
for (let i = 0; i < inputHistoryLength + 2; i++) {
const input = TestInput.input.getHistory(i);
const corrected = TestInput.corrected.getHistory(i);
const word = TestWords.words.get(i);
const word = TestWords.words.get(i) ?? "";
const koreanRegex =
/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/;
const containsKorean =
input?.match(
/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g,
) !== null ||
word?.match(
/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g,
) !== null;
koreanRegex.test(input ?? "") || koreanRegex.test(word);

const wordEl = document.createElement("div");
wordEl.className = "word";
Expand Down Expand Up @@ -1376,7 +1373,7 @@ async function loadWordsHistory(): Promise<boolean> {
}

const inputCharacters = Strings.splitIntoCharacters(input);
const wordCharacters = Strings.splitIntoCharacters(word ?? "");
const wordCharacters = Strings.splitIntoCharacters(word);
const correctedCharacters = Strings.splitIntoCharacters(corrected ?? "");

let loop;
Expand Down
Loading