diff --git a/superset-frontend/src/explore/reducers/exploreReducer.js b/superset-frontend/src/explore/reducers/exploreReducer.js index 818bb31c8c381..87c3aa9b0a6ee 100644 --- a/superset-frontend/src/explore/reducers/exploreReducer.js +++ b/superset-frontend/src/explore/reducers/exploreReducer.js @@ -141,8 +141,8 @@ export default function exploreReducer(state = {}, action) { if (controlName === 'metrics' && old_metrics_data && new_column_config) { value.forEach((item, index) => { if ( - item.label !== old_metrics_data[index].label && - !!new_column_config[old_metrics_data[index].label] + item?.label !== old_metrics_data[index]?.label && + !!new_column_config[old_metrics_data[index]?.label] ) { new_column_config[item.label] = new_column_config[old_metrics_data[index].label];