From 392535ce3aad89fad52074399ec7b6986de8c4e9 Mon Sep 17 00:00:00 2001 From: Artem Baskal Date: Tue, 14 Jan 2020 11:09:17 +0300 Subject: [PATCH] - client: change code style of top clients normalization helper --- client/src/helpers/helpers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index 54fcfa75..3f9511bc 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -277,11 +277,11 @@ export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').sp export const normalizeTopClients = topClients => topClients.reduce((nameToCountMap, clientObj) => { const { name, count, info: { name: infoName } } = clientObj; // eslint-disable-next-line no-param-reassign - nameToCountMap.auto = { ...nameToCountMap.auto, [name]: count }; + nameToCountMap.auto[name] = count; // eslint-disable-next-line no-param-reassign - nameToCountMap.configured = { ...nameToCountMap.configured, [infoName]: count }; + nameToCountMap.configured[infoName] = count; return nameToCountMap; -}, {}); +}, { auto: {}, configured: {} }); export const getClientInfo = (clients, ip) => { const client = clients