From 8f0cb0b7b6959b1cc9c3d62e50b19aa630e32cde Mon Sep 17 00:00:00 2001 From: Joshua Collins Date: Thu, 20 Aug 2020 11:55:21 -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 4d3e967..37a5053 100644 --- a/app/store/agents.js +++ b/app/store/agents.js @@ -44,7 +44,7 @@ const Agents = () => { obj.deleteAgentById = (agentId) => { const index = obj.agents.findIndex(agent => agent.id === agentId) if (index !== -1) { - obj.splice(index, 1) + obj.agents.splice(index, 1) return true } else { return false