From d0136a493d9b2d4673d7bd55bef1bdb3d992961b Mon Sep 17 00:00:00 2001 From: PaulDremanovich Date: Sat, 16 Mar 2024 16:54:04 +0400 Subject: [PATCH] fix: actualize branch + simplify condition in mutation --- src/store/modules/bot-commands/bot-commands-mutations.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/modules/bot-commands/bot-commands-mutations.ts b/src/store/modules/bot-commands/bot-commands-mutations.ts index 456556ca5..ff252731a 100644 --- a/src/store/modules/bot-commands/bot-commands-mutations.ts +++ b/src/store/modules/bot-commands/bot-commands-mutations.ts @@ -6,10 +6,8 @@ export const mutations: MutationTree = { 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) } } }