From b68e94fea1c23cabc7b800c08a45bf5e32634750 Mon Sep 17 00:00:00 2001 From: SpiderMan Date: Thu, 16 Jun 2022 12:59:11 -0400 Subject: [PATCH] adding extra metrics after chart configuration --- superset-frontend/src/explore/reducers/exploreReducer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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];