dont set homePageRoute to custom if field is empty

This commit is contained in:
barisusakli
2016-07-15 12:05:21 +03:00
parent e233defa9f
commit c042d16f40

View File

@@ -123,7 +123,7 @@ module.exports = function(User) {
topicSearchEnabled: data.topicSearchEnabled,
delayImageLoading: data.delayImageLoading,
groupTitle: data.groupTitle,
homePageRoute: (data.homePageCustom || data.homePageRoute || '').replace(/^\//, ''),
homePageRoute: (data.homePageCustom || (data.homePageRoute !== 'custom' ? data.homePageRoute : '') || '').replace(/^\//, ''),
scrollToMyPost: data.scrollToMyPost
};