You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/04/03 23:34:17 UTC
(superset) branch fix/bignumber-colorpicker-null-crash created (now 0a646e77f72)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a change to branch fix/bignumber-colorpicker-null-crash
in repository https://gitbox.apache.org/repos/asf/superset.git
at 0a646e77f72 fix(big-number): guard against null colorPicker in transformProps
This branch includes the following new commits:
new 0a646e77f72 fix(big-number): guard against null colorPicker in transformProps
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(big-number): guard against null colorPicker in transformProps
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix/bignumber-colorpicker-null-crash
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 0a646e77f72f8f6e4c3b39b427c112e7180a2797
Author: Amin Ghadersohi <am...@gmail.com>
AuthorDate: Fri Apr 3 16:33:06 2026 -0700
fix(big-number): guard against null colorPicker in transformProps
colorPicker defaults to null when the control has never been set (e.g. on
a freshly-created Big Number chart). Destructuring it directly crashes:
TypeError: Cannot destructure property 'r' of 'colorPicker' as it is null
Fall back to the default teal colour (r=0, g=122, b=135) when colorPicker
is null or undefined.
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
.../src/BigNumber/BigNumberWithTrendline/transformProps.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts
index 0010a19f8c3..78fcb51c076 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts
@@ -140,7 +140,7 @@ export default function transformProps(
const compareLag = Number(compareLag_) || 0;
let formattedSubheader = subheader;
- const { r, g, b } = colorPicker;
+ const { r = 0, g = 122, b = 135 } = colorPicker ?? {};
const mainColor = `rgb(${r}, ${g}, ${b})`;
const xAxisLabel = getXAxisLabel(rawFormData) as string;