From a03ff942c40665c451bd4c7768f46e3e5f00e97c Mon Sep 17 00:00:00 2001 From: Stanislav Lvovsky Date: Mon, 16 Aug 2021 12:16:09 +0300 Subject: [PATCH] Fixes #1609: only use setKeysForSync if it exists --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 116e7bc..29c3446 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -197,7 +197,7 @@ export async function setEnabled(enabled: boolean): Promise { } export function setKeysForSync(...keys: (SyncedState | string)[]) { - return _context?.globalState.setKeysForSync([...keys, SyncedState.Version, SyncedState.WelcomeViewVisible]); + return _context?.globalState?.setKeysForSync([...keys, SyncedState.Version, SyncedState.WelcomeViewVisible]); } export function notifyOnUnsupportedGitVersion(version: string) {