mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -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
|
||||
dispatch(permissionsActions.storePermissions(body.permissions));
|
||||
dispatch(messageCountActions.getCount(body.user.username));
|
||||
if (typeof body.user !== 'undefined') {
|
||||
dispatch(messageCountActions.getCount(body.user.username));
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue