From 4f343ed81304c6b65509b2381c880d3398e6e469 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Thu, 10 Dec 2015 21:21:04 +0100 Subject: [PATCH] ooops --- webapp/pages/profile.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/pages/profile.jsx b/webapp/pages/profile.jsx index dc7f59b..0ec7e31 100644 --- a/webapp/pages/profile.jsx +++ b/webapp/pages/profile.jsx @@ -32,7 +32,9 @@ module.exports = function(boardsAPI){ var uid = props.params.userid if(uid === 'me') uid = boards.id ee.on('boards for '+uid,l => { - if(!this.isMounted() || props.params.userid !== uid) return true + var u2id = props.params.userid + if(u2id === 'me') u2id = boards.id + if(!this.isMounted() || u2id !== uid) return true this.setState({ boards: l }) }) boards.getProfile(uid,(err,res) => { @@ -52,7 +54,6 @@ module.exports = function(boardsAPI){ var ee = boards.getEventEmitter() if(boards.isInit || this.state.api){ var uid = this.props.params.userid - if(uid === 'me') uid = boards.id this.downloadProfile(boards,this.props) this.setState({ init: true }) }