diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/frontend/app/data/LineColors.ts | 6 |
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; |
