diff --git a/app/store/agents.js b/app/store/agents.js index b74e6a8..4d3e967 100644 --- a/app/store/agents.js +++ b/app/store/agents.js @@ -42,7 +42,7 @@ const Agents = () => { } obj.deleteAgentById = (agentId) => { - const index = obj.findIndex(agent => agent.id === agentId) + const index = obj.agents.findIndex(agent => agent.id === agentId) if (index !== -1) { obj.splice(index, 1) return true