Skip to content

Commit

Permalink
fix: dashboard reload crash (apache#17992)
Browse files Browse the repository at this point in the history
* fix dashboard reload

* add more strict case

(cherry picked from commit 3d829fc)
  • Loading branch information
pkdotson authored and rosemarie-chiu committed Jan 11, 2022
1 parent 6e7dbe2 commit 97c3845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/src/dashboard/components/DashboardGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down

0 comments on commit 97c3845

Please sign in to comment.