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) {