Merge: - client: fix empty disallowed_clients

* commit 'd8f8e6b94a9461c56554c33fe861cb46f4b3f954':
  - client: empty disallowed_clients
This commit is contained in:
Andrey Meshkov 2020-02-14 14:21:21 +03:00
commit 9a81451586
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ export const toggleClientBlock = (type, ip) => async (dispatch) => {
const { const {
allowed_clients, disallowed_clients, blocked_hosts, allowed_clients, disallowed_clients, blocked_hosts,
} = await apiClient.getAccessList(); } = await apiClient.getAccessList();
let updatedDisallowedClients = disallowed_clients; let updatedDisallowedClients = disallowed_clients || [];
if (type === ACTION.unblock && updatedDisallowedClients.includes(ip)) { if (type === ACTION.unblock && updatedDisallowedClients.includes(ip)) {
updatedDisallowedClients = updatedDisallowedClients.filter(client => client !== ip); updatedDisallowedClients = updatedDisallowedClients.filter(client => client !== ip);