Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/components/global/GameConsole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ const GameConsole: React.FC = () => {
// Set the text.
if (_previous >= 0) {
// Save the typed text.
if (previous === -1) {
if (_previous === -1) {
setCurrentText(conRef.current.value);
}

conRef.current.value = previousCommands[previous];
conRef.current.value = previousCommands[_previous];
} else {
conRef.current.value = currentText;
}
Expand Down Expand Up @@ -147,13 +147,13 @@ const GameConsole: React.FC = () => {
else _previous -= 1;

// Set the text.
if (previous >= 0) {
if (_previous >= 0) {
// Save the typed text.
if (previous === -1) {
if (_previous === -1) {
setCurrentText(conRef.current.value);
}

conRef.current.value = previousCommands[previous];
conRef.current.value = previousCommands[_previous];
} else {
conRef.current.value = currentText;
}
Expand Down Expand Up @@ -203,7 +203,7 @@ const GameConsole: React.FC = () => {
addConsoleText(
'**WARNING** `UI.DrawEnable` is not writable from the console, which will also be hidden when the UI is not drawing. You can use *' +
key +
'* to toggle the game UI.'
'* to toggle the game UI.',
);

// Clear the text.
Expand Down Expand Up @@ -312,7 +312,7 @@ const GameConsole: React.FC = () => {
}}
>
{suggestions[i].text} <strong>{suggestions[i].desc}</strong>
</li>
</li>,
);
}

Expand Down