fix(ci): simplify first-session day count cast

This commit is contained in:
2026-03-28 13:25:38 -07:00
parent e4c8c60b3e
commit b1638afe21

View File

@@ -93,8 +93,7 @@ function isFirstSessionForLocalDay(
currentSessionId: number, currentSessionId: number,
startedAtMs: number, startedAtMs: number,
): boolean { ): boolean {
return ( return Number(
Number(
( (
db db
.prepare( .prepare(
@@ -108,10 +107,9 @@ function isFirstSessionForLocalDay(
) )
`, `,
) )
.get(startedAtMs, startedAtMs, startedAtMs, currentSessionId) as ExistenceRow | null .get(startedAtMs, startedAtMs, startedAtMs, currentSessionId) as ExistenceRow | null,
)?.count ?? 0, )?.count ?? 0
) === 0; ) === 0;
);
} }
function resetLifetimeSummaries(db: DatabaseSync, nowMs: string): void { function resetLifetimeSummaries(db: DatabaseSync, nowMs: string): void {