mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-10 12:24:20 +01:00
remove handler to event when unnecessary
This commit is contained in:
parent
b75ec8b724
commit
997304844a
@ -29,7 +29,9 @@ module.exports = function(boardsAPI){
|
||||
})
|
||||
if(this.props.params.userid){
|
||||
ee.on('whitelist for '+this.props.params.boardname+'@'+this.props.params.userid,(whitelist) => {
|
||||
if(this.isMounted()) this.setState({ whitelist })
|
||||
if(this.isMounted())
|
||||
this.setState({ whitelist })
|
||||
else return true
|
||||
})
|
||||
ee.on('settings for '+this.props.params.boardname+'@'+this.props.params.userid, (res) => {
|
||||
if(!this.isMounted()) return true
|
||||
|
Loading…
Reference in New Issue
Block a user