Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fix date function.

Brian Caodee58f8a55c3
diff --git a/lib/date.js b/lib/date.js
index d86efcd87..13b19e360 100644
--- a/lib/date.js
+++ b/lib/date.js
@@ -181,8 +181,8 @@ export function getDateArray(data, startDate, endDate, unit) {
const n = diff(endDate, startDate) + 1;
function findData(date) {
- const d = data.find(({ t }) => {
- return normalize(getDateFromString(t)).getTime() === date.getTime();
+ const d = data.find(({ x, t }) => {
+ return normalize(getDateFromString(x || t)).getTime() === date.getTime();
});
return d?.y || 0;