Avoid NPE
This commit is contained in:
parent
3342754a72
commit
0d5f7ef246
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ export default React.createClass({
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return {
|
return {
|
||||||
err: null,
|
err: null,
|
||||||
groups: [],
|
groups: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ export default React.createClass({
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const GroupPublicityToggle = sdk.getComponent('groups.GroupPublicityToggle');
|
const GroupPublicityToggle = sdk.getComponent('groups.GroupPublicityToggle');
|
||||||
const groupPublicityToggles = this.state.groups.map((groupId, index) => {
|
const groupPublicityToggles = (this.state.groups || []).map((groupId, index) => {
|
||||||
return <GroupPublicityToggle key={index} groupId={groupId} />;
|
return <GroupPublicityToggle key={index} groupId={groupId} />;
|
||||||
});
|
});
|
||||||
return <div>
|
return <div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue