using last letter in word node list when input is longer than ui word

closes #3558
This commit is contained in:
Miodec 2022-09-16 20:54:34 +02:00
parent 0797b5cfb7
commit ccc5badb49

View file

@ -63,7 +63,7 @@ export async function updatePosition(): Promise<void> {
] as HTMLElement;
const previousLetter: HTMLElement = currentWordNodeList[
currentLetterIndex - 1
Math.min(currentLetterIndex - 1, currentWordNodeList.length - 1)
] as HTMLElement;
const currentLanguage = await Misc.getCurrentLanguage(Config.language);