1
0
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:
Enrico Fasoli 2015-12-10 21:15:02 +01:00
parent b75ec8b724
commit 997304844a

View File

@ -29,7 +29,9 @@ module.exports = function(boardsAPI){
}) })
if(this.props.params.userid){ if(this.props.params.userid){
ee.on('whitelist for '+this.props.params.boardname+'@'+this.props.params.userid,(whitelist) => { 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) => { ee.on('settings for '+this.props.params.boardname+'@'+this.props.params.userid, (res) => {
if(!this.isMounted()) return true if(!this.isMounted()) return true