Skip to content

Commit d72d47c

Browse files
Restoring some code
1 parent e82a1f3 commit d72d47c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/authentication/keychain.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export function init(ctx: GlobalStateContext, keychain: Keytar = systemKeychain)
5353
export async function getToken(host: string, { storage = defaultStorage, keychain = defaultKeychain } = {}): Promise<string | null | undefined> {
5454
host = toCanonical(host);
5555
const token = keychain!.getPassword(SERVICE_ID, host)
56-
.catch(() => {
57-
return storage!.get(keyFor(host));
58-
});
56+
.catch(() => storage!.get(keyFor(host)));
5957

6058
// While we're transitioning everything out of configuration and into local storage, it's possible
6159
// that we end up in a state where a host is not in the hosts list (perhaps because it was removed

0 commit comments

Comments
 (0)