Skip to content

Commit 4cd3f79

Browse files
committed
fix(admin): explicit compare fn on CampaignProgressionTable day sort
Sonar flagged the plain `.sort()` as a reliability issue (implementation- defined ordering). Mirror the chart's compare pattern with `localeCompare` to match.
1 parent 86ce023 commit 4cd3f79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/app/src/modules/admin/stats/CampaignProgressionTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function CampaignProgressionTable({ series }: Props) {
2020
new Set(
2121
series.flatMap(({ points }) => points.map(({ day }) => day.slice(5))),
2222
),
23-
).sort();
23+
).sort((a, b) => a.localeCompare(b));
2424

2525
const byDayByYear = new Map<number, Map<string, number>>();
2626
for (const { year, points } of series) {

0 commit comments

Comments
 (0)