From d8f8e6b94a9461c56554c33fe861cb46f4b3f954 Mon Sep 17 00:00:00 2001
From: Ildar Kamalov <i.kamalov@adguard.com>
Date: Thu, 13 Feb 2020 18:54:28 +0300
Subject: [PATCH] - client: empty disallowed_clients

---
 client/src/actions/access.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/src/actions/access.js b/client/src/actions/access.js
index 96c661c1..cebe8975 100644
--- a/client/src/actions/access.js
+++ b/client/src/actions/access.js
@@ -55,7 +55,7 @@ export const toggleClientBlock = (type, ip) => async (dispatch) => {
         const {
             allowed_clients, disallowed_clients, blocked_hosts,
         } = await apiClient.getAccessList();
-        let updatedDisallowedClients = disallowed_clients;
+        let updatedDisallowedClients = disallowed_clients || [];
 
         if (type === ACTION.unblock && updatedDisallowedClients.includes(ip)) {
             updatedDisallowedClients = updatedDisallowedClients.filter(client => client !== ip);