Skip to content

Commit ee7b406

Browse files
yeion7SaraVieira
authored andcommitted
Prevent crash on team items (codesandbox#2483)
* prevent crash * default teams empty array
1 parent 6e360f3 commit ee7b406

File tree

1 file changed

+2
-2
lines changed
  • packages/app/src/app/pages/Dashboard/Sidebar

1 file changed

+2
-2
lines changed

packages/app/src/app/pages/Dashboard/Sidebar/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ class Sidebar extends React.Component {
8888
return null;
8989
}
9090

91-
if (error) {
91+
if (error || !data.me) {
9292
return null;
9393
}
9494

95-
const { teams } = data.me;
95+
const { teams = [] } = data.me;
9696

9797
return teams.map(team => (
9898
<div key={team.id}>

0 commit comments

Comments
 (0)