From 6085fbe4caa6339eee5113e9447cffceb6972743 Mon Sep 17 00:00:00 2001 From: Valeriy Date: Sun, 26 May 2019 23:03:10 +0300 Subject: [PATCH] fix(client): show profile immediately for the current user --- .../src/client-only-routes/ShowProfileOrFourOhFour.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/client-only-routes/ShowProfileOrFourOhFour.js b/client/src/client-only-routes/ShowProfileOrFourOhFour.js index f7a1103a34..58d07fe2ef 100644 --- a/client/src/client-only-routes/ShowProfileOrFourOhFour.js +++ b/client/src/client-only-routes/ShowProfileOrFourOhFour.js @@ -56,12 +56,12 @@ class ShowFourOhFour extends Component { render() { const { isSessionUser, requestedUser, showLoading } = this.props; - if (showLoading) { - // We don't know if /:maybeUser is a user or not, we will show the loader - // until we get a response from the API - return ; - } if (isEmpty(requestedUser)) { + if (showLoading) { + // We don't know if /:maybeUser is a user or not, we will show + // the loader until we get a response from the API + return ; + } // We have a response from the API, but there is nothing in the store // for /:maybeUser. We can derive from this state the /:maybeUser is not // a user the API recognises, so we 404