UTDNebula/utd-trends

Handle undefined in CompareTable

Open

#633 opened on May 24, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (35 forks)auto 404
Help WantedMultiple EngineersType: Bug ReportType: InternalType: User Experience

Repository metrics

Stars
 (28 stars)
PR merge metrics
 (PR metrics pending)

Description

Issue

Sentry Issue: TRENDS-5T

TypeError: Cannot read properties of undefined (reading 'toFixed')
  at <object>.{children#4}.formatValue (src/components/compare/CompareTable/CompareTable.tsx:505:53)
  at <object>.children (src/components/compare/CompareTable/CompareTable.tsx:152:38)
  at Array.map (<anonymous>)
  at b (src/components/compare/CompareTable/CompareTable.tsx:138:15)
...
(14 additional frame(s) were not displayed)

How to Resolve

  • detect other cases where this occurs (adding to compare crashes the page)
  • add a guard to prevent crashes due to undefined

Related

#485 #475

Contributor guide