From 77a541e34e2a15a36765cc0ac9462f0738e8c435 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 14 Nov 2025 19:16:51 +0100 Subject: Fix line colours on map --- src/frontend/app/data/LineColors.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/frontend/app/data') diff --git a/src/frontend/app/data/LineColors.ts b/src/frontend/app/data/LineColors.ts index 878fd8f..00ed890 100644 --- a/src/frontend/app/data/LineColors.ts +++ b/src/frontend/app/data/LineColors.ts @@ -88,12 +88,12 @@ export function getLineColor( region: RegionId, line: string, ): LineColorInfo { - const normalizedLine = line.toLowerCase().trim(); + const formattedLine = /^[a-zA-Z]/.test(line) ? line : `L${line}`; if (region === "vigo") { - return vigoLineColors[normalizedLine] ?? defaultLineColor; + return vigoLineColors[formattedLine] ?? defaultLineColor; } else if (region === "santiago") { - return santiagoLineColors[normalizedLine] ?? defaultLineColor; + return santiagoLineColors[formattedLine] ?? defaultLineColor; } return defaultLineColor; -- cgit v1.3