Commit 931606c4 authored by Matthew Taylor's avatar Matthew Taylor Committed by GitHub

Merge pull request #1424 from mewtaylor/issue/double-api-call

key api calls on `username` check
parents b2db8cba d0e7c29b
...@@ -36,7 +36,7 @@ var Splash = injectIntl(React.createClass({ ...@@ -36,7 +36,7 @@ var Splash = injectIntl(React.createClass({
}, },
componentDidUpdate: function (prevProps) { componentDidUpdate: function (prevProps) {
if (this.props.user != prevProps.user) { if (this.props.user != prevProps.user) {
if (this.props.user) { if (this.props.user.username) {
this.getActivity(this.props.user.username); this.getActivity(this.props.user.username);
this.getSharedByFollowing(this.props.user.token); this.getSharedByFollowing(this.props.user.token);
this.getInStudiosFollowing(this.props.user.token); this.getInStudiosFollowing(this.props.user.token);
...@@ -59,7 +59,7 @@ var Splash = injectIntl(React.createClass({ ...@@ -59,7 +59,7 @@ var Splash = injectIntl(React.createClass({
}, },
componentDidMount: function () { componentDidMount: function () {
this.getFeaturedGlobal(); this.getFeaturedGlobal();
if (this.props.user) { if (this.props.user.username) {
this.getActivity(this.props.user.username); this.getActivity(this.props.user.username);
this.getSharedByFollowing(this.props.user.token); this.getSharedByFollowing(this.props.user.token);
this.getInStudiosFollowing(this.props.user.token); this.getInStudiosFollowing(this.props.user.token);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment