From 07e2731a2e9343833cdfb9bbae5ecddc97f8043e Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Mon, 18 Dec 2023 23:58:39 -0500 Subject: [PATCH] Access Returned Object With Global Key (#7240) --- apps/browser/src/autofill/content/notification-bar.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/browser/src/autofill/content/notification-bar.ts b/apps/browser/src/autofill/content/notification-bar.ts index 6c3f3561e5..c68467d050 100644 --- a/apps/browser/src/autofill/content/notification-bar.ts +++ b/apps/browser/src/autofill/content/notification-bar.ts @@ -87,6 +87,7 @@ async function loadNotificationBar() { // Look up the active user id from storage const activeUserIdKey = "activeUserId"; + const globalStorageKey = "global"; let activeUserId: string; const activeUserStorageValue = await getFromLocalStorage(activeUserIdKey); @@ -98,7 +99,9 @@ async function loadNotificationBar() { const userSettingsStorageValue = await getFromLocalStorage(activeUserId); if (userSettingsStorageValue[activeUserId]) { const userSettings: UserSettings = userSettingsStorageValue[activeUserId].settings; - const globalSettings: GlobalSettings = await getFromLocalStorage("global"); + const globalSettings: GlobalSettings = (await getFromLocalStorage(globalStorageKey))[ + globalStorageKey + ]; // Do not show the notification bar on the Bitwarden vault // because they can add logins and change passwords there