mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
chore(style): Enforce optional chaining (#21614)
This commit is contained in:
@@ -155,7 +155,7 @@ export default function transformProps(
|
||||
}
|
||||
|
||||
let metricEntry;
|
||||
if (chartProps.datasource && chartProps.datasource.metrics) {
|
||||
if (chartProps.datasource?.metrics) {
|
||||
metricEntry = chartProps.datasource.metrics.find(
|
||||
metricEntry => metricEntry.metric_name === metric,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user