Skip to content

Commit

Permalink
style(Console): single auto-complete console entry (#1509)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
  • Loading branch information
pedrolamas authored Oct 15, 2024
1 parent 91ac45d commit 3bd7097
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/widgets/console/ConsoleCommand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ export default class ConsoleCommand extends Vue {
if (commands.length === 1) {
this.emitChange(commands[0])
} else {
commands.forEach(command => {
const message = `// ${command}: ${availableCommands[command].help ?? ''}`
this.$store.dispatch('console/onAddConsoleEntry', { message, type: 'response' })
})
} else if (commands.length > 0) {
const message = commands
.map(command => `// ${command}: ${availableCommands[command].help ?? ''}`)
.join('\n')
this.$store.dispatch('console/onAddConsoleEntry', { message, type: 'response' })
}
}
}
Expand Down

0 comments on commit 3bd7097

Please sign in to comment.