diff --git a/src/components/CustomPages/BI/BI005LoginRecord.js b/src/components/CustomPages/BI/BI005LoginRecord.js index c2a4ed3..8417483 100644 --- a/src/components/CustomPages/BI/BI005LoginRecord.js +++ b/src/components/CustomPages/BI/BI005LoginRecord.js @@ -152,9 +152,13 @@ class BI005LoginRecord extends React.Component { } } if (this.state.totalActiveUsers == 0) { - this.state.totalActiveUsers = ret.Data.reverse().find( - (item) => item.type === 0 - ).COUNT; + // this.state.totalActiveUsers = ret.Data.reverse().find((item) => item.type === 0 ).COUNT; + var ActiveUsers = ret.Data.reverse().find((item) => item.type === 0) + if (ActiveUsers != null && ActiveUsers.length > 0) { + this.state.totalActiveUsers = ActiveUsers.length + } else { + this.state.totalActiveUsers = 0; + } } this.state.dates.push(moment().format("MM/DD")); this.state.loginNums.push(todayCount);