aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-14 19:16:51 +0100
committerGitHub <noreply@github.com>2025-11-14 19:16:51 +0100
commit77a541e34e2a15a36765cc0ac9462f0738e8c435 (patch)
tree61b835958d98a30ea93ebcda184f6619775d0359 /src/frontend/app
parent967566be94825ed2b996da14b19a0d75b11c5521 (diff)
Fix line colours on map
Diffstat (limited to 'src/frontend/app')
-rw-r--r--src/frontend/app/data/LineColors.ts6
1 files changed, 3 insertions, 3 deletions
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;