Repository navigation
Commit 247896e
authored
fix: Prevent crash when only one metric name exists (#1806)
Closes HDX-3511
# Summary
This PR fixes a crash that occurs when only one metric name is available. The actual fix is 1 character, and is noted in the comments. The rest of the changes are for unit testing the case and adding an error boundary around the chart editor component.
## Before
https://github.com/user-attachments/assets/e374b36b-0be3-468d-9469-3b1a5c88cd44
## After
https://github.com/user-attachments/assets/50004a07-b13e-4ff5-babb-952e391a8871
## New Error Boundary
If a similar error were to happen again, there is now an ErrorBoundary wrapping the chart editor, so there is no full page crash:
<img width="1757" height="865" alt="Screenshot 2026-02-25 at 3 15 13 PM" src="https://github.com/user-attachments/assets/a2eda617-efcf-4b41-8765-f586d285f50e" />1 parent 6708687 commit 247896e
4 files changed
Lines changed: 679 additions & 455 deletions
File tree
- .changeset
- packages/app/src/components
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments