Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/server-stats/api/parts/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function fetchDatapoints(db, filter, options, callback) {
if (options.monthlyBreakdown) {
const dataPoints = result
.reduce((acc, current) => {
let dp = current.e + current.s;
let dp = (current.e || 0) + (current.s || 0);

if (/^\[CLY\]_consolidated/.test(current._id)) {
// do not count consolidated dp for countly hosted clients
Expand Down Expand Up @@ -415,4 +415,4 @@ function getAppName(appId, appNames) {
}


module.exports = {updateDataPoints, isConsolidated, increaseDataPoints, punchCard, fetchDatapoints, getTop, getAppName, internalEventsEnum};
module.exports = {updateDataPoints, isConsolidated, increaseDataPoints, punchCard, fetchDatapoints, getTop, getAppName, internalEventsEnum};
Loading