mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Fix realtime.
This commit is contained in:
parent
b4f6dfedda
commit
329df22a5d
@ -180,9 +180,9 @@ export function getDateArray(data, startDate, endDate, unit) {
|
|||||||
const [diff, add, normalize] = dateFuncs[unit];
|
const [diff, add, normalize] = dateFuncs[unit];
|
||||||
const n = diff(endDate, startDate) + 1;
|
const n = diff(endDate, startDate) + 1;
|
||||||
|
|
||||||
function findData(t) {
|
function findData(date) {
|
||||||
const d = data.find(({ x }) => {
|
const d = data.find(({ t }) => {
|
||||||
return normalize(getDateFromString(x)).getTime() === t.getTime();
|
return normalize(getDateFromString(t)).getTime() === date.getTime();
|
||||||
});
|
});
|
||||||
|
|
||||||
return d?.y || 0;
|
return d?.y || 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user