From 3e382f8d437d5f4a6265aef5b92e5ce2d6affe2d Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Mon, 25 Apr 2022 21:37:24 +0900 Subject: [PATCH] refactor: delete unnecessary `if` condition --- src/checkServerVersion.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/checkServerVersion.ts b/src/checkServerVersion.ts index b6a55a8..e2fcc74 100644 --- a/src/checkServerVersion.ts +++ b/src/checkServerVersion.ts @@ -66,15 +66,11 @@ function serverVersionInfo(config: WorkspaceConfiguration): { configurationTarget: ConfigurationTarget; } { const computedVersion = config.get(configSection)!; - const { defaultValue, globalValue, workspaceValue } = - config.inspect(configSection)!; + const { defaultValue, globalValue } = config.inspect(configSection)!; const configurationTarget = (() => { if (globalValue && globalValue !== defaultValue) { return ConfigurationTarget.Global; } - if (workspaceValue && workspaceValue !== defaultValue) { - return ConfigurationTarget.Workspace; - } return ConfigurationTarget.Workspace; })(); return {