aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-09 11:45:06 +0000
committerVeetaha <[email protected]>2020-02-09 11:45:06 +0000
commit7a09274e52dc00f7d4e3a040686aa1eb1e075671 (patch)
tree8eee4244d9678765d7eae7545a0c9977842f114a /editors
parent34241b9af966208d73f37f1cdf7f862f2590d846 (diff)
vscode: refactor inverted ternaries to if statements as per @matklad
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/installation/fetch_latest_artifact_metadata.ts4
2 files changed, 6 insertions, 2 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 46394600b..d5f3da2ed 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -97,7 +97,9 @@ export class Config {
97 97
98 const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform); 98 const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform);
99 99
100 return !prebuiltBinaryName ? null : { 100 if (!prebuiltBinaryName) return null;
101
102 return {
101 type: BinarySource.Type.GithubRelease, 103 type: BinarySource.Type.GithubRelease,
102 dir: ctx.globalStoragePath, 104 dir: ctx.globalStoragePath,
103 file: prebuiltBinaryName, 105 file: prebuiltBinaryName,
diff --git a/editors/code/src/installation/fetch_latest_artifact_metadata.ts b/editors/code/src/installation/fetch_latest_artifact_metadata.ts
index f1019e089..9141c92ef 100644
--- a/editors/code/src/installation/fetch_latest_artifact_metadata.ts
+++ b/editors/code/src/installation/fetch_latest_artifact_metadata.ts
@@ -26,7 +26,9 @@ export async function fetchLatestArtifactMetadata(
26 26
27 const artifact = response.assets.find(artifact => artifact.name === artifactFileName); 27 const artifact = response.assets.find(artifact => artifact.name === artifactFileName);
28 28
29 return !artifact ? null : { 29 if (!artifact) return null;
30
31 return {
30 releaseName: response.name, 32 releaseName: response.name,
31 downloadUrl: artifact.browser_download_url 33 downloadUrl: artifact.browser_download_url
32 }; 34 };