await theme swapping to prevent removetheme and applytheme from overriding each other

This commit is contained in:
SethBurkart123
2024-04-07 15:18:35 +10:00
parent 7c9896a128
commit 1292c06294
+1 -1
View File
@@ -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 };