mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-02 11:59:07 -05:00
only dispatch count if the user
is present
this prevents a console error
This commit is contained in:
parent
ce88466ee4
commit
7945a7eff1
1 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,9 @@ module.exports.refreshSession = function () {
|
||||||
|
|
||||||
// get the permissions from the updated session
|
// get the permissions from the updated session
|
||||||
dispatch(permissionsActions.storePermissions(body.permissions));
|
dispatch(permissionsActions.storePermissions(body.permissions));
|
||||||
dispatch(messageCountActions.getCount(body.user.username));
|
if (typeof body.user !== 'undefined') {
|
||||||
|
dispatch(messageCountActions.getCount(body.user.username));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue