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
  • Loading branch information
pkdotson authored and bwang221 committed Feb 10, 2022
1 parent 21c2ebd commit 36a047b
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 36a047b

Please sign in to comment.