Reset to base theme when no default theme is set and leaving UUID/handle theme

This commit is contained in:
Alexandre Vryghem
2023-07-30 19:43:20 +02:00
parent 887eacbfa8
commit ea677bda74
2 changed files with 10 additions and 6 deletions

View File

@@ -5,7 +5,8 @@ import { environment } from '../environments/environment';
import { hasNoValue } from '../app/shared/empty.util';
import { AppConfig } from './app-config.interface';
import { ThemeConfig } from './theme.model';
import { ThemeConfig, NamedThemeConfig } from './theme.model';
import { BASE_THEME_NAME } from '../app/shared/theme-support/theme.constants';
/**
* Extend Angular environment with app config.
@@ -44,7 +45,9 @@ const getDefaultThemeConfig = (): ThemeConfig => {
hasNoValue(themeConfig.regex) &&
hasNoValue(themeConfig.handle) &&
hasNoValue(themeConfig.uuid)
);
) ?? {
name: BASE_THEME_NAME,
} as NamedThemeConfig;
};
export {