From 955429f4ab614f15484cd94dbe4c6d4411bd2b57 Mon Sep 17 00:00:00 2001 From: Joshua Collins Date: Thu, 20 Aug 2020 11:53:35 -0400 Subject: [PATCH] added delete agent function --- app/store/agents.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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