Skip to content

Commit

Permalink
fix: actualize branch + simplify condition in mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulDremanovich committed Mar 16, 2024
1 parent a7a4348 commit d0136a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/modules/bot-commands/bot-commands-mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ export const mutations: MutationTree<BotCommandsState> = {
const commandValue = botCommand.command.trim()
if (!state.commands[botCommand.partnerId]) {
state.commands[botCommand.partnerId] = [commandValue]
} else {
if (!state.commands[botCommand.partnerId].includes(commandValue)) {
state.commands[botCommand.partnerId].push(commandValue)
}
} else if (!state.commands[botCommand.partnerId].includes(commandValue)) {
state.commands[botCommand.partnerId].push(commandValue)
}
}
}

0 comments on commit d0136a4

Please sign in to comment.