From 9c69a3be3932fc0f28c845a986ad3426b7a7a500 Mon Sep 17 00:00:00 2001 From: "sheche@microsoft.com" Date: Sat, 1 Jun 2019 10:23:11 +0800 Subject: [PATCH] fix: Do not sign out if switch to the same endpoint --- src/commands/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/plugin.ts b/src/commands/plugin.ts index 3e3b5bf0..481bd6dd 100644 --- a/src/commands/plugin.ts +++ b/src/commands/plugin.ts @@ -26,7 +26,7 @@ export async function switchEndpoint(): Promise { }, ); const choice: IQuickItemEx | undefined = await vscode.window.showQuickPick(picks); - if (!choice) { + if (!choice || choice.value === getLeetCodeEndpoint()) { return; } const leetCodeConfig: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("leetcode");