From e1e8c4c63d89c9a901b3db6ced58c50f4350f6b3 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 14 Nov 2026 10:18:03 +0100 Subject: [PATCH] fix(flight-live): sort attribution sources with an explicit compare --- server/src/nest/flight-live/flight-live.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/nest/flight-live/flight-live.service.ts b/server/src/nest/flight-live/flight-live.service.ts index 26d8f75eb..89c45a635 100644 --- a/server/src/nest/flight-live/flight-live.service.ts +++ b/server/src/nest/flight-live/flight-live.service.ts @@ -138,7 +138,9 @@ export class FlightLiveService { /** The credit line for what the answer shows: the sources its legs were read from, else the first source. */ private attributionFor(flights: readonly FlightLiveLeg[]): string { - const sources = [...new Set(flights.flatMap((f) => (f.source ? [f.source] : [])))].sort(); + const sources = [...new Set(flights.flatMap((f) => (f.source ? [f.source] : [])))].sort((a, b) => + a.localeCompare(b), + ); if (sources.length === 0) return this.feeds.attribution(); return sources.map((source) => FEED_ATTRIBUTION[source]).join('; '); }