From 8c8deb3d3db72a2f091156d3ec10447f0e6c062c Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 12 Dec 2019 11:33:02 +0300 Subject: [PATCH] - client: fix request count in clients table --- client/src/components/Settings/Clients/ClientsTable.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/Settings/Clients/ClientsTable.js b/client/src/components/Settings/Clients/ClientsTable.js index f81e5c4f..058cd96d 100644 --- a/client/src/components/Settings/Clients/ClientsTable.js +++ b/client/src/components/Settings/Clients/ClientsTable.js @@ -62,9 +62,9 @@ class ClientsTable extends Component { }; }; - getStats = (ids, stats) => { + getStats = (name, stats) => { if (stats) { - const currentStats = stats.find(item => ids.includes(item.name)); + const currentStats = stats.find(item => item.info && item.info.name === name); return currentStats && currentStats.count; } @@ -180,8 +180,8 @@ class ClientsTable extends Component { accessor: 'statistics', minWidth: 120, Cell: (row) => { - const { ids } = row.original; - const clientStats = this.getStats(ids, this.props.topClients); + const { name } = row.original; + const clientStats = this.getStats(name, this.props.topClients); if (clientStats) { return (