fix: theme auto enabling attempting to reach unitialized variables

This commit is contained in:
sethburkart123
2024-06-19 22:39:19 +10:00
parent 90b9a1a3f3
commit 139f680d44
3 changed files with 2 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@ import { settingsState } from '../../utils/listeners/SettingsState';
export const enableCurrentTheme = async () => {
console.log('enableCurrentTheme', settingsState.selectedTheme, await localforage.getItem(settingsState.selectedTheme));
if (settingsState.selectedTheme) {
const theme = await localforage.getItem(settingsState.selectedTheme) as CustomTheme;
if (theme) {
-1
View File
@@ -1,4 +1,3 @@
import browser from 'webextension-polyfill';
import localforage from 'localforage';
import { CustomTheme } from '../../../interface/types/CustomThemes';
import { applyTheme } from './applyTheme';