1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-01 16:13:27 +00:00

Improve null checks in content scripts (#2390)

This commit is contained in:
Oscar Hinton
2022-02-15 16:11:44 +01:00
committed by GitHub
parent 8375d6ecbb
commit 519e4b9372
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}
});

View File

@@ -58,7 +58,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
});
chrome.storage.local.get(activeUserId, (obj: any) => {
if (obj === null) {
if (obj?.[activeUserId] == null) {
return;
}