Merge remote-tracking branch 'origin/dev' into dev

pull/1873/head
Mike Cao 2023-04-04 00:34:15 -07:00
commit 2631f00598
1 changed files with 3 additions and 3 deletions

View File

@ -180,9 +180,9 @@ export function getDateArray(data, startDate, endDate, unit) {
const [diff, add, normalize] = dateFuncs[unit];
const n = diff(endDate, startDate) + 1;
function findData(t) {
const d = data.find(({ x }) => {
return normalize(getDateFromString(x)).getTime() === t.getTime();
function findData(date) {
const d = data.find(({ x, t }) => {
return normalize(getDateFromString(x || t)).getTime() === date.getTime();
});
return d?.y || 0;