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 -1
View File
@@ -59,12 +59,12 @@ async function init() {
const icon = document.querySelector('link[rel*="icon"]')! as HTMLLinkElement
icon.href = icon48
enableCurrentTheme()
try {
// wait until settingsState has been loaded from storage
await initializeSettingsState();
if (settingsState.onoff) {
enableCurrentTheme()
// TEMP FIX for bug! -> this is a hack to get the injected.css file to have HMR in development mode as this import system is currently broken with crxjs
if (import.meta.env.MODE === 'development') {