File tree 2 files changed +3
-3
lines changed
frontend/web/components/pages
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ const EnvironmentSettingsPage = class extends Component {
76
76
} ,
77
77
{ forceRefetch : true } ,
78
78
) . then ( ( res ) => {
79
- const matchingItems = roles . data . results . filter ( ( item1 ) =>
79
+ const matchingItems = roles ? .data ? .results ? .filter ( ( item1 ) =>
80
80
res . data . results . some ( ( item2 ) => item2 . role === item1 . id ) ,
81
81
)
82
82
this . setState ( { roles : matchingItems } )
Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ const ProjectSettingsPage = class extends Component {
65
65
{
66
66
organisation_id : AccountStore . getOrganisation ( ) . id ,
67
67
project_id : this . props . match . params . projectId ,
68
- role_id : roles . data . results [ 0 ] . id ,
68
+ role_id : roles ? .data ? .results [ 0 ] ? .id ,
69
69
} ,
70
70
{ forceRefetch : true } ,
71
71
) . then ( ( res ) => {
72
- const matchingItems = roles . data . results . filter ( ( item1 ) =>
72
+ const matchingItems = roles ? .data ? .results ? .filter ( ( item1 ) =>
73
73
res . data . results . some ( ( item2 ) => item2 . role === item1 . id ) ,
74
74
)
75
75
this . setState ( { roles : matchingItems } )
You can’t perform that action at this time.
0 commit comments