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) => { export const normalizeTopClients = clients => clients.reduce((accumulator, clientObj) => {
const { name, count } = clientObj; const { name, count } = clientObj;
const idToCountMap = accumulator; // eslint-disable-next-line no-param-reassign
idToCountMap[name] = count; accumulator[name] = count;
return idToCountMap; return accumulator;
}, {}); }, {});
export const getClientInfo = (clients, ip) => { export const getClientInfo = (clients, ip) => {