diff --git a/src-web/lib/theme/themes.ts b/src-web/lib/theme/themes.ts index ebeac079..ce84f842 100644 --- a/src-web/lib/theme/themes.ts +++ b/src-web/lib/theme/themes.ts @@ -6,7 +6,9 @@ import { resolveAppearance } from './appearance'; export async function getThemes() { const themes = (await invokeCmd('cmd_get_themes')).flatMap((t) => t.themes); themes.sort((a, b) => a.label.localeCompare(b.label)); - return { themes: [yaakDark, yaakLight, ...themes] }; + // Remove duplicates, in case multiple plugins provide the same theme + const uniqueThemes = Array.from(new Map(themes.map((t) => [t.id, t])).values()); + return { themes: [yaakDark, yaakLight, ...uniqueThemes] }; } export async function getResolvedTheme(