[bugfix] Main Page: MessageInputBox: Fix the bug that can't bring the history back and occur undefined error when shift+arrow down kay pressed.

This commit is contained in:
Sakamoto Shiina
2025-01-02 16:00:00 +09:00
parent 7616a11a46
commit d798562de7

View File

@@ -69,7 +69,7 @@ export const MessageInputBox = () => {
if (history_index > -1) {
const new_index = history_index - 1;
setHistoryIndex(new_index);
setInputValue(
updateMessageInputValue(
new_index >= 0
? message_history[message_history.length - 1 - new_index]
: ""