Skip to content

Commit

Permalink
fix: simplify conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulDremanovich committed Mar 12, 2024
1 parent 26e4a9f commit a44821d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/AChat/AChatForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import { nextTick } from 'vue'
import ChatEmojis from '@/components/Chat/ChatEmojis.vue'
import { isMobile } from '@/lib/display-mobile'
import { isSingleSymbol } from '@/lib/chat/helpers/isSingleSymbol'
export default {
components: { ChatEmojis },
Expand Down Expand Up @@ -157,11 +156,10 @@ export default {
onKeyCommand: function (event) {
if (event.ctrlKey && event.shiftKey && event.code === 'Digit1') {
this.openElement()
}
if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {
} else if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {
this.selectCommand(event.code)
event.preventDefault()
} else if (isSingleSymbol(event.key)) {
} else if (event.key.length === 1) {
this.botCommandSelectionMode = false
this.botCommandIndex = null
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/chat/helpers/isSingleSymbol.ts

This file was deleted.

0 comments on commit a44821d

Please sign in to comment.