mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
chore(style): Enforce optional chaining (#21614)
This commit is contained in:
@@ -46,7 +46,7 @@ export default function transformProps(chartProps: BigNumberTotalChartProps) {
|
||||
data.length === 0 ? null : parseMetricValue(data[0][metricName]);
|
||||
|
||||
let metricEntry;
|
||||
if (chartProps.datasource && chartProps.datasource.metrics) {
|
||||
if (chartProps.datasource?.metrics) {
|
||||
metricEntry = chartProps.datasource.metrics.find(
|
||||
metricItem => metricItem.metric_name === metric,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user