From 2bbd9dde65947c3ed899d6100ab779524580ac44 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 16 Jan 2023 11:08:21 +0100 Subject: [PATCH] history unlimited arrow down bugfix --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index f9196ac..f408755 100644 --- a/js/main.js +++ b/js/main.js @@ -133,7 +133,7 @@ document.addEventListener("keydown", e => { history.index++; textCur.textContent = history.list[history.index]; cursorPosition = textCur.textContent.length; - } else { + } else if (history.index < history.list.length) { history.index++; textCur.textContent = ""; cursorPosition = 0;