change code style in reduce

This commit is contained in:
Artem Baskal 2019-12-20 16:22:38 +03:00
parent 57c031c1c6
commit ca79fc98f5
1 changed files with 3 additions and 3 deletions

View File

@ -263,9 +263,9 @@ export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').sp
export const normalizeTopClients = clients => clients.reduce((accumulator, clientObj) => {
const { name, count } = clientObj;
const idToCountMap = accumulator;
idToCountMap[name] = count;
return idToCountMap;
// eslint-disable-next-line no-param-reassign
accumulator[name] = count;
return accumulator;
}, {});
export const getClientInfo = (clients, ip) => {