1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-19 11:15:21 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}