dont assign member in getInitialState

This commit is contained in:
Bruno Windels 2018-09-10 17:39:03 +02:00
parent 92f7e29132
commit 2aaf3e6b89

View file

@ -32,8 +32,6 @@ module.exports = React.createClass({
displayName: 'MemberList',
getInitialState: function() {
this._mounted = false;
const cli = MatrixClientPeg.get();
if (cli.hasLazyLoadMembersEnabled()) {
return {loading: true};
@ -43,6 +41,7 @@ module.exports = React.createClass({
},
componentWillMount: function() {
this._mounted = false;
const cli = MatrixClientPeg.get();
if (!cli.hasLazyLoadMembersEnabled()) {
this._listenForMembersChanges();