From 13bbb7226a1e7bcd2ee3b4cbe12bdd792f7056a1 Mon Sep 17 00:00:00 2001 From: Andreas Tzionis Date: Sun, 30 Jun 2024 00:44:01 +0300 Subject: [PATCH] fixed theme index bug --- lib/client/vanilla/editor.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/client/vanilla/editor.tsx b/lib/client/vanilla/editor.tsx index c7ac9025..db443290 100644 --- a/lib/client/vanilla/editor.tsx +++ b/lib/client/vanilla/editor.tsx @@ -385,8 +385,7 @@ function Editor({ standaloneServer = false }) { setOpen={setSelectOpen} onChange={(e) => { const index = themes.findIndex((r) => r.name === e) - loadThemeComponents(index) - setThemeIndex(index) + loadThemeComponents(index).then(() => setThemeIndex(index)) }} />