You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Avoid NPE
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user