[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:
@@ -69,7 +69,7 @@ export const MessageInputBox = () => {
|
|||||||
if (history_index > -1) {
|
if (history_index > -1) {
|
||||||
const new_index = history_index - 1;
|
const new_index = history_index - 1;
|
||||||
setHistoryIndex(new_index);
|
setHistoryIndex(new_index);
|
||||||
setInputValue(
|
updateMessageInputValue(
|
||||||
new_index >= 0
|
new_index >= 0
|
||||||
? message_history[message_history.length - 1 - new_index]
|
? message_history[message_history.length - 1 - new_index]
|
||||||
: ""
|
: ""
|
||||||
|
|||||||
Reference in New Issue
Block a user