We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17c8f6d commit c7ac9adCopy full SHA for c7ac9ad
frontend/src/ts/test/test-ui.ts
@@ -451,7 +451,10 @@ export async function updateWordsInputPosition(initial = false): Promise<void> {
451
const currentLanguage = await JSONData.getCurrentLanguage(Config.language);
452
const isLanguageRTL = currentLanguage.rightToLeft;
453
454
- const el = document.querySelector("#wordsInput") as HTMLElement;
+ const el = document.querySelector<HTMLElement>("#wordsInput");
455
+
456
+ if (!el) return;
457
458
const activeWord =
459
document.querySelectorAll<HTMLElement>("#words .word")[
460
TestState.activeWordIndex - activeWordElementOffset
0 commit comments