diff --git a/ghost/core/core/server/api/endpoints/settings-public.js b/ghost/core/core/server/api/endpoints/settings-public.js index 9c4d3c3b30..f337c040cb 100644 --- a/ghost/core/core/server/api/endpoints/settings-public.js +++ b/ghost/core/core/server/api/endpoints/settings-public.js @@ -2,6 +2,7 @@ const settingsCache = require('../../../shared/settings-cache'); const urlUtils = require('../../../shared/url-utils'); const ghostVersion = require('@tryghost/version'); const announcementBarSettings = require('../../services/announcement-bar-service'); +const labs = require('../../../shared/labs'); module.exports = { docName: 'settings', @@ -9,7 +10,10 @@ module.exports = { browse: { permissions: true, query(frame) { - const announcementSettings = announcementBarSettings.getAnnouncementSettings(frame.options.context?.member); + let announcementSettings; + if (labs.isSet('announcementBar')) { + announcementSettings = announcementBarSettings.getAnnouncementSettings(frame.options.context?.member); + } // @TODO: decouple settings cache from API knowledge // The controller fetches models (or cached models) and the API frame for the target API version formats the response.