From f7d88f6976ae8328bc47c0df4686ae6a38ed7bb0 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Mon, 3 Jun 2019 16:39:02 +0300 Subject: [PATCH] * client: check initial access settings --- client/src/reducers/access.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/reducers/access.js b/client/src/reducers/access.js index be8931dc..b8fc14ed 100644 --- a/client/src/reducers/access.js +++ b/client/src/reducers/access.js @@ -14,9 +14,9 @@ const access = handleActions( } = payload; const newState = { ...state, - allowed_clients: allowed_clients.join('\n'), - disallowed_clients: disallowed_clients.join('\n'), - blocked_hosts: blocked_hosts.join('\n'), + allowed_clients: (allowed_clients && allowed_clients.join('\n')) || '', + disallowed_clients: (disallowed_clients && disallowed_clients.join('\n')) || '', + blocked_hosts: (blocked_hosts && blocked_hosts.join('\n')) || '', processing: false, }; return newState; @@ -35,9 +35,9 @@ const access = handleActions( { processing: true, processingSet: false, - allowed_clients: null, - disallowed_clients: null, - blocked_hosts: null, + allowed_clients: '', + disallowed_clients: '', + blocked_hosts: '', }, );