Skip to content

Commit

Permalink
fixed eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ngvtuan committed Aug 19, 2024
1 parent f58af2b commit 490de5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/helpers/statisticsLib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,12 @@ export function transformStatisticsChart(
dataY.push(value);
dataX.push(new Date(trans[i].time).toLocaleString());
}
if (period === '24h' && !timestamp && trans.length && checkValidateData(trans[trans.length - 1]?.time)) {
if (
period === '24h' &&
!timestamp &&
trans.length &&
checkValidateData(trans[trans.length - 1]?.time)
) {
dataX.push(new Date().toLocaleString());
dataY.push(dataY[dataY.length - 1]);
}
Expand Down

0 comments on commit 490de5a

Please sign in to comment.