Skip to content

Commit 990d2ba

Browse files
committed
Fix getting data from previous days
1 parent e778d2f commit 990d2ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compositions/all-tab-list-summary.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ export async function useAllTabListSummary(sortingBy: SortingBy): Promise<Overal
1010
const unSortedTabs = repo.getTabs();
1111
let tabs: Tab[] = [];
1212

13-
const summaryTimeListForToday = unSortedTabs.map(function (tab) {
14-
return tab.days.find(day => day.date === todayLocalDate())?.summary;
13+
const todayTabs = unSortedTabs.filter(x => x.days.find(s => s.date === todayLocalDate()));
14+
15+
const summaryTimeListForToday = todayTabs.map(function (tab) {
16+
return tab.days.find(day => day.date === todayLocalDate())!.summary;
1517
});
1618

1719
const todaySummaryTime =

0 commit comments

Comments
 (0)