Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/consistency-score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
activeDates: Set<string>,
timeZone = "UTC",
): ConsistencyScoreResult {
const sortedDates = Array.from(activeDates).sort();
const sortedDates = Array.from(activeDates).sort((a, b) => a - b);

Check failure on line 136 in src/lib/consistency-score.ts

View workflow job for this annotation

GitHub Actions / Type check

The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Check failure on line 136 in src/lib/consistency-score.ts

View workflow job for this annotation

GitHub Actions / Type check

The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
const today = todayInTimezone(timeZone);

const weeklyConsistency = computeWeeklyConsistency(activeDates);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/streak-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if (key) dayKeys.add(key);
}

return Array.from(dayKeys).sort();
return Array.from(dayKeys).sort((a, b) => a - b);

Check failure on line 23 in src/lib/streak-utils.ts

View workflow job for this annotation

GitHub Actions / Type check

The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Check failure on line 23 in src/lib/streak-utils.ts

View workflow job for this annotation

GitHub Actions / Type check

The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
}

function getRuns(dates: StreakDate[]): { end: string; length: number }[] {
Expand Down
Loading