Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed May 30, 2024
1 parent 58bc9fa commit 8beb2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/extension-base/src/background/handlers/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ export default class State {

// retrieve previously set authorizations
const storageAuthUrls: Record<string, string> = await chrome.storage.local.get(AUTH_URLS_KEY);
const authString = storageAuthUrls[AUTH_URLS_KEY] || '{}';
const authString = storageAuthUrls?.[AUTH_URLS_KEY] || '{}';
const previousAuth = JSON.parse(authString) as AuthUrls;

this.#authUrls = previousAuth;

// retrieve previously set default auth accounts
const storageDefaultAuthAccounts: Record<string, string> = await chrome.storage.local.get(DEFAULT_AUTH_ACCOUNTS);
const defaultAuthString: string = storageDefaultAuthAccounts[DEFAULT_AUTH_ACCOUNTS] || '[]';
const defaultAuthString: string = storageDefaultAuthAccounts?.[DEFAULT_AUTH_ACCOUNTS] || '[]';
const previousDefaultAuth = JSON.parse(defaultAuthString) as string[];

this.defaultAuthAccountSelection = previousDefaultAuth;
Expand Down

0 comments on commit 8beb2cb

Please sign in to comment.