Skip to content

Commit

Permalink
fix: dashboard reload crash (#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 eschutho committed Jan 27, 2022
1 parent dbe43b8 commit f98fcff
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 f98fcff

Please sign in to comment.