bug fixes: crash in editing group member permissions, fnd not working sometimes, var -> let, const

This commit is contained in:
or-else
2018-12-13 15:42:54 +03:00
parent 10d88da558
commit bc3e82bcbf
12 changed files with 49 additions and 85 deletions
+2 -12
View File
@@ -8,21 +8,11 @@ import { makeImageUrl } from '../lib/blob-helpers.js';
export default class GroupSubs extends React.Component {
constructor(props) {
super(props);
this.state = {
onlineSubs: props.subscribers || []
};
}
static getDerivedStateFromProps(nextProps, prevState) {
return {
onlineSubs: nextProps.subscribers ? nextProps.subscribers : []
};
}
render() {
var usersOnline = [];
this.state.onlineSubs.map((sub) => {
const usersOnline = [];
(this.props.subscribers || []).map((sub) => {
usersOnline.push(
<div className="avatar-box" key={sub.user}>
<LetterTile