UTDNebula/utd-trends

Handle undefined in CompareTable

開放

#633 建立於 2026年5月24日

 (3 則留言) (0 個反應) (0 位負責人)TypeScript (35 個分叉)auto 404
Help WantedMultiple EngineersType: Bug ReportType: InternalType: User Experience

倉庫指標

星標
 (28 顆星)
PR 合併指標
 (平均合併 16天 20小時) (30 天內合併 1 個 PR)

描述

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

貢獻者指南