From 079d6f540c78eb3b1fb3c5d07eed3d1a3fd947f5 Mon Sep 17 00:00:00 2001 From: Xylight Date: Thu, 25 Jul 2024 12:33:58 -0700 Subject: [PATCH] fix: change current theme for imported themes --- src/lib/ui/colors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/ui/colors.ts b/src/lib/ui/colors.ts index 0f562176..968387c3 100644 --- a/src/lib/ui/colors.ts +++ b/src/lib/ui/colors.ts @@ -214,12 +214,13 @@ if (browser) { if (oldColors) { themeData.update((td) => ({ ...td, + currentTheme: Math.max(...td.themes.map((t) => t.id)) + 1, themes: [ ...td.themes, { id: Math.max(...td.themes.map((t) => t.id)) + 1, colors: JSON.parse(oldColors), - name: t.get('routes.theme.preset.imported') ?? 'Your Theme', + name: t.get('routes.theme.preset.imported') || 'Your Theme', }, ], }))