fix(predict): handle undefined team alias in sport card token matching#28937
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
Risk assessment: Low risk - these are purely defensive null-safety fixes with no behavioral changes when data is well-formed. The logic change only affects edge cases where Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
The
FeaturedCarouselSportCardcrashes withTypeError: Cannot read property 'toLowerCase' of undefinedwhen a sport team'saliasfield isundefinedin the API response (observed with European football teams like SC Freiburg, RC Celta de Vigo).The fix extracts a
matchesTeamhelper that safely guards againstundefinedvalues onalias,name, andtitlebefore calling.toLowerCase(). ThePredictSportTeam.aliastype is also corrected tooptionalto match the actual API contract.Changelog
CHANGELOG entry: Fixed a crash in the featured carousel when sport team alias data was missing
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Cursor Bugbot is generating a summary for commit f5b9dfe. Configure here.