From 997304844ae18332ce6a6ddb4b8f279f6697c804 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Thu, 10 Dec 2015 21:15:02 +0100 Subject: [PATCH] remove handler to event when unnecessary --- webapp/pages/board.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/pages/board.jsx b/webapp/pages/board.jsx index 10e06b4..1afee67 100644 --- a/webapp/pages/board.jsx +++ b/webapp/pages/board.jsx @@ -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