mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
key api calls on username
check
`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
This commit is contained in:
parent
b2db8cbac8
commit
d0e7c29b5f
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue