From 1292c06294f77495f2f506ea5a079d8de1a49384 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Sun, 7 Apr 2024 15:18:35 +1000 Subject: [PATCH] await theme swapping to prevent removetheme and applytheme from overriding each other --- src/seqta/ui/themes/setTheme.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seqta/ui/themes/setTheme.ts b/src/seqta/ui/themes/setTheme.ts index 6d1631de..aadf6d51 100644 --- a/src/seqta/ui/themes/setTheme.ts +++ b/src/seqta/ui/themes/setTheme.ts @@ -18,7 +18,7 @@ export const setTheme = async (themeId: string) => { if (enabledTheme.selectedTheme) { const currentTheme = await localforage.getItem(enabledTheme.selectedTheme) as CustomTheme; if (currentTheme) { - removeTheme(currentTheme); + await removeTheme(currentTheme); } const color = await browser.storage.local.get('originalSelectedColor') as { originalSelectedColor: string; }; originalSelectedColor = { selectedColor: color.originalSelectedColor };