This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new a8a6b732e9 adding extra metrics after chart configuration (#20410)
a8a6b732e9 is described below

commit a8a6b732e9fb37ac2f4de953d099ce6a4937e17d
Author: Smart-Codi <[email protected]>
AuthorDate: Thu Jun 16 19:55:14 2022 +0100

    adding extra metrics after chart configuration (#20410)
---
 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 818bb31c8c..87c3aa9b0a 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];

Reply via email to