Handle CUSTOM_HOMEPAGE=false
This one's been broken for a while, but should only affect `yarn dev-server` and those who does not have access to the homepages.
This commit is contained in:
parent
ceca6e3b84
commit
7d1992d541
1 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,10 @@ const loadAnnouncements = (homepageKeys) => {
|
||||||
|
|
||||||
// this didn't seem to help.
|
// this didn't seem to help.
|
||||||
if (!memo.homepageData) {
|
if (!memo.homepageData) {
|
||||||
|
if (process.env.CUSTOM_HOMEPAGE !== 'true') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
memo.homepageData = require('../../custom/homepages/v2');
|
memo.homepageData = require('../../custom/homepages/v2');
|
||||||
memo.announcements = loadAnnouncements(Object.keys(memo.homepageData));
|
memo.announcements = loadAnnouncements(Object.keys(memo.homepageData));
|
||||||
|
|
Loading…
Reference in a new issue