Commit 7945a7ef authored by Matthew Taylor's avatar Matthew Taylor

only dispatch count if the `user` is present

this prevents a console error
parent ce88466e
...@@ -97,7 +97,9 @@ module.exports.refreshSession = function () { ...@@ -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;
} }
}); });
......
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