mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix date function.
This commit is contained in:
parent
76296bc2ee
commit
dee58f8a55
1 changed files with 2 additions and 2 deletions
|
|
@ -181,8 +181,8 @@ export function getDateArray(data, startDate, endDate, unit) {
|
||||||
const n = diff(endDate, startDate) + 1;
|
const n = diff(endDate, startDate) + 1;
|
||||||
|
|
||||||
function findData(date) {
|
function findData(date) {
|
||||||
const d = data.find(({ t }) => {
|
const d = data.find(({ x, t }) => {
|
||||||
return normalize(getDateFromString(t)).getTime() === date.getTime();
|
return normalize(getDateFromString(x || t)).getTime() === date.getTime();
|
||||||
});
|
});
|
||||||
|
|
||||||
return d?.y || 0;
|
return d?.y || 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue