From a2359dd769322fb4a313de52ed155eb9e195c4c6 Mon Sep 17 00:00:00 2001 From: jubnl Date: Mon, 6 Apr 2026 20:17:02 +0200 Subject: [PATCH] fix: unrelated changes --- server/src/services/atlasService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/services/atlasService.ts b/server/src/services/atlasService.ts index 9f0717d4..bb48347e 100644 --- a/server/src/services/atlasService.ts +++ b/server/src/services/atlasService.ts @@ -241,7 +241,7 @@ export async function getStats(userId: number) { const countries = [...countrySet.values()].map(c => { const countryTrips = trips.filter(t => c.tripIds.has(t.id)); - const dates = countryTrips.map(t => t.start_date).filter(Boolean).sort((a, b) => a.localeCompare(b)); + const dates = countryTrips.map(t => t.start_date).filter(Boolean).sort(); return { code: c.code, placeCount: c.places.length, @@ -272,7 +272,7 @@ export async function getStats(userId: number) { } } - const mostVisited = countries.length > 0 ? countries.reduce((a, b) => a.placeCount > b.placeCount ? a : b, countries[0]) : null; + const mostVisited = countries.length > 0 ? countries.reduce((a, b) => a.placeCount > b.placeCount ? a : b) : null; const continents: Record = {}; countries.forEach(c => {