0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed boot order for themes services

refs c33b596e9c

- initializing the themes service before the custom theme settings service meant that `customThemeSettings.api` was not available when it's called as part of theme initialization
- swapped the boot order around so that the supporting service initialization is performed before the full themes service is initialized
This commit is contained in:
Kevin Ansfield 2021-10-11 12:23:34 +01:00
parent 8737ec8888
commit 3fd2e36720

View file

@ -117,10 +117,11 @@ async function initServicesForFrontend() {
debug('End: Routing Settings');
debug('Begin: Themes');
const themeService = require('./server/services/themes');
await themeService.init();
// customThemSettingsService.api must be initialized before any theme activation occurs
const customThemeSettingsService = require('./server/services/custom-theme-settings');
customThemeSettingsService.init();
const themeService = require('./server/services/themes');
await themeService.init();
debug('End: Themes');
debug('End: initServicesForFrontend');