From d0e7c29b5fc096cd160a9d76a43a26df76954468 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 20 Jul 2017 15:01:36 -0400 Subject: [PATCH] key api calls on `username` check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `this.props.user` will now return `true` because there is a default user object that’s empty. So, instead, wait for an actual user object --- src/views/splash/splash.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 374742719..aae44b28c 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -36,7 +36,7 @@ var Splash = injectIntl(React.createClass({ }, componentDidUpdate: function (prevProps) { if (this.props.user != prevProps.user) { - if (this.props.user) { + if (this.props.user.username) { this.getActivity(this.props.user.username); this.getSharedByFollowing(this.props.user.token); this.getInStudiosFollowing(this.props.user.token); @@ -59,7 +59,7 @@ var Splash = injectIntl(React.createClass({ }, componentDidMount: function () { this.getFeaturedGlobal(); - if (this.props.user) { + if (this.props.user.username) { this.getActivity(this.props.user.username); this.getSharedByFollowing(this.props.user.token); this.getInStudiosFollowing(this.props.user.token);