Skip to content

Commit

Permalink
Fixed closing new command window instead of canceling leaving an empt…
Browse files Browse the repository at this point in the history
…y, active command
  • Loading branch information
PakL committed Oct 27, 2019
1 parent f912275 commit 538e3b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions res/botview_cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ window.addEventListener('load', () => {
command_timeout.value = command.timeout
command_points.value = (typeof(command.points) !== 'undefined' ? command.points : '0')

if(command.cmd.length <= 0 && command.active) {
command.active = false
commands[cmdId] = command
setJSON('bot_commands', commands)
}

command_response.addEventListener('keyup', (e) => {
charactersRemaining(command_response, 500, char_remain)
})
Expand Down

0 comments on commit 538e3b9

Please sign in to comment.