Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: include_built_in_themes not working (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman authored Dec 21, 2023
1 parent b53f8b7 commit d9299de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/components/theme/hooks/useThemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ export default function useThemes(): Theme[] {
return useMemo(() => {
const customThemes: Theme[] = [];

if (customThemes.length === 0 || config?.theme?.include_built_in_themes !== false) {
customThemes.push(...DEFAULT_THEMES);
}

customThemes.push(
...[...(config?.theme?.themes ?? []), ...getThemes()].map(t =>
'extends' in t ? createTheme(t) : t,
),
);

if (customThemes.length === 0 || config?.theme?.include_built_in_themes !== false) {
customThemes.push(...DEFAULT_THEMES);
}

const defaultTheme = config?.theme?.default_theme;
if (isNotEmpty(defaultTheme)) {
customThemes.sort((a, b) => {
Expand Down

0 comments on commit d9299de

Please sign in to comment.