diff --git a/src/redux/session.js b/src/redux/session.js index 9addc58b1..12645753f 100644 --- a/src/redux/session.js +++ b/src/redux/session.js @@ -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; } });