hainenber commented on code in PR #43218:
URL: https://github.com/apache/superset/pull/43218#discussion_r3789750998
##########
superset-frontend/plugins/plugin-chart-echarts/src/Histogram/transformProps.ts:
##########
@@ -80,7 +80,7 @@ export default function transformProps(
const percentFormatter = getPercentFormatter(NumberFormats.PERCENT_2_POINT);
const groupbySet = new Set(groupby);
- const xAxisData: string[] = Object.keys(data[0])
+ const xAxisData: string[] = Object.keys(data[0] || {})
Review Comment:
it would be more idiomatic to use nullish coaslecing
```suggestion
const xAxisData: string[] = Object.keys(data[0] ?? {})
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]