1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00

added extra check for error

This commit is contained in:
Enrico Fasoli 2015-11-20 16:06:00 +01:00
parent 2ab3e5a94d
commit 8da785420e

View File

@ -297,6 +297,7 @@ var Users = React.createClass({
},
componentDidMount: function(){
boards.searchUsers().on('user',(id) => {
if(id === undefined) console.log('found undefined user???')
if(this.isMounted() && this.state.users.indexOf(id) < 0)
this.setState({ users: this.state.users.concat(id) })
})