Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #452 from yoshinorin/refactor/delete-unnecessary-i…
Browse files Browse the repository at this point in the history
…f-condition

refactor: delete unnecessary `if` condition
  • Loading branch information
dos65 authored Apr 25, 2022
2 parents a84e6ef + 3e382f8 commit 1660f1c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/checkServerVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,11 @@ function serverVersionInfo(config: WorkspaceConfiguration): {
configurationTarget: ConfigurationTarget;
} {
const computedVersion = config.get<string>(configSection)!;
const { defaultValue, globalValue, workspaceValue } =
config.inspect<string>(configSection)!;
const { defaultValue, globalValue } = config.inspect<string>(configSection)!;
const configurationTarget = (() => {
if (globalValue && globalValue !== defaultValue) {
return ConfigurationTarget.Global;
}
if (workspaceValue && workspaceValue !== defaultValue) {
return ConfigurationTarget.Workspace;
}
return ConfigurationTarget.Workspace;
})();
return {
Expand Down

0 comments on commit 1660f1c

Please sign in to comment.