fixed a bug where backspacing the first word in the first row after scrolling would break the website

This commit is contained in:
Jack 2020-08-15 01:20:11 +01:00
parent 5c954c91a0
commit 73433fed13

View file

@ -3491,7 +3491,11 @@ $(document).keydown((event) => {
if (event["keyCode"] == 8) {
event.preventDefault();
if (!testActive) return;
if (currentInput == "" && inputHistory.length > 0) {
if (
currentInput == "" &&
inputHistory.length > 0 &&
currentWordElementIndex > 0
) {
if (
(inputHistory[currentWordIndex - 1] ==
wordsList[currentWordIndex - 1] &&