You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2022/01/27 01:05:14 UTC

[superset] 04/12: fix: dashboard reload crash (#17992)

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

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

commit f98fcffb5a537776b0c0837e34f0b8b775f9bb75
Author: Phillip Kelley-Dotson <pk...@yahoo.com>
AuthorDate: Mon Jan 10 18:34:28 2022 -0800

    fix:  dashboard reload crash (#17992)
    
    * fix dashboard reload
    
    * add more strict case
---
 superset-frontend/src/dashboard/components/DashboardGrid.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/dashboard/components/DashboardGrid.jsx b/superset-frontend/src/dashboard/components/DashboardGrid.jsx
index ad03859..f12ffcb 100644
--- a/superset-frontend/src/dashboard/components/DashboardGrid.jsx
+++ b/superset-frontend/src/dashboard/components/DashboardGrid.jsx
@@ -158,7 +158,7 @@ class DashboardGrid extends React.PureComponent {
             </DragDroppable>
           )}
 
-          {gridComponent.children.map((id, index) => (
+          {gridComponent?.children?.map((id, index) => (
             <DashboardComponent
               key={id}
               id={id}
@@ -176,7 +176,7 @@ class DashboardGrid extends React.PureComponent {
           ))}
 
           {/* make the area below components droppable */}
-          {editMode && gridComponent.children.length > 0 && (
+          {editMode && gridComponent?.children?.length > 0 && (
             <DragDroppable
               component={gridComponent}
               depth={depth}