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

villebro 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 c01f810  fix(cross-filters): Fix missed metadata (#14220)
c01f810 is described below

commit c01f8101eb084da159a10c7b4c2857efdb0dff9f
Author: simcha90 <[email protected]>
AuthorDate: Sun Apr 18 18:46:38 2021 +0300

    fix(cross-filters): Fix missed metadata (#14220)
    
    * fix:fix get permission function
    
    * fix: fix missed metadata case
---
 superset-frontend/src/dashboard/actions/hydrate.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/dashboard/actions/hydrate.js 
b/superset-frontend/src/dashboard/actions/hydrate.js
index d304eda..0206d91 100644
--- a/superset-frontend/src/dashboard/actions/hydrate.js
+++ b/superset-frontend/src/dashboard/actions/hydrate.js
@@ -84,7 +84,7 @@ export const hydrateDashboard = (dashboardData, chartData, 
datasourcesData) => (
   getState,
 ) => {
   const { user, common } = getState();
-  const { metadata } = dashboardData;
+  let { metadata } = dashboardData;
   const queryParams = querystring.parse(window.location.search);
   const urlParams = extractUrlParams(queryParams);
   const editMode = queryParams.edit === 'true';
@@ -314,6 +314,10 @@ export const hydrateDashboard = (dashboardData, chartData, 
datasourcesData) => (
           ) ?? {}
         )?.behaviors ?? [];
 
+      if (!metadata) {
+        metadata = {};
+      }
+
       if (!metadata.chart_configuration) {
         metadata.chart_configuration = {};
       }

Reply via email to