Solve Custom home page route error bug (#9180)

When you select Custom Route as home you get a 404 error "/custom not found" error.
This because 'homePageRoute' property was used instead of 'homePageCustom'
This commit is contained in:
Manuel Valle
2021-01-07 20:44:02 -06:00
committed by GitHub
parent 8ece64ab82
commit e14b67786c

View File

@@ -7,7 +7,7 @@ const meta = require('../meta');
const user = require('../user'); const user = require('../user');
function adminHomePageRoute() { function adminHomePageRoute() {
return (meta.config.homePageRoute || meta.config.homePageCustom || '').replace(/^\/+/, '') || 'categories'; return ((meta.config.homePageRoute === 'custom' ? meta.config.homePageCustom : meta.config.homePageRoute) || 'categories').replace(/^\//, '');
} }
async function getUserHomeRoute(uid) { async function getUserHomeRoute(uid) {