diff --git a/src/posts/user.js b/src/posts/user.js index 817edda518..1a82ab9591 100644 --- a/src/posts/user.js +++ b/src/posts/user.js @@ -43,7 +43,7 @@ module.exports = function(Posts) { userTitle: group.userTitle }; - if (group.name === results.userSettings[i].groupTitle && group.userTitleEnabled) { + if (results.userSettings[i] && group.name === results.userSettings[i].groupTitle && group.userTitleEnabled) { userData.selectedGroup = userData.groups[index]; } });