Commit 536d30b
fix(big-number): guard against null colorPicker in transformProps
colorPicker defaults to null when the colour-picker control has never been
set (e.g. a freshly-created Big Number chart). Destructuring it directly
crashes:
TypeError: Cannot destructure property 'r' of 'colorPicker' as it is null
When colorPicker is null/undefined, mainColor is now left undefined so that
BigNumberViz falls back to its existing BRAND_COLOR default. The ECharts
trendline options fall back to BRAND_COLOR explicitly since they require a
string value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent aa5adb0 commit 536d30b
1 file changed
Lines changed: 6 additions & 4 deletions
File tree
- superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
293 | | - | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
298 | | - | |
| 300 | + | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
| |||
0 commit comments