diff --git a/src/content/autofiller.ts b/src/content/autofiller.ts index 2903e6f8cf..89dd09bf58 100644 --- a/src/content/autofiller.ts +++ b/src/content/autofiller.ts @@ -14,7 +14,7 @@ document.addEventListener("DOMContentLoaded", (event) => { }); chrome.storage.local.get(activeUserId, (obj: any) => { - if (obj != null && obj[activeUserId].settings.enableAutoFillOnPageLoad === true) { + if (obj?.[activeUserId]?.settings?.enableAutoFillOnPageLoad === true) { setInterval(() => doFillIfNeeded(), 500); } }); diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index ecc6e61c92..425d70be63 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -58,7 +58,7 @@ document.addEventListener("DOMContentLoaded", (event) => { }); chrome.storage.local.get(activeUserId, (obj: any) => { - if (obj === null) { + if (obj?.[activeUserId] == null) { return; }