From 1c04d11fc0447e7ecf7af156482a56a0290c75e9 Mon Sep 17 00:00:00 2001 From: Ino de Bruijn Date: Thu, 19 Dec 2019 17:36:49 -0500 Subject: [PATCH 1/2] improve footer version logic Only add v prefix if the API does not return the v prefix --- src/AppStore.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AppStore.ts b/src/AppStore.ts index c38d85dca87..e7192bbb85c 100644 --- a/src/AppStore.ts +++ b/src/AppStore.ts @@ -79,7 +79,11 @@ export class AppStore { invoke:async()=>{ const portalVersionResult = await internalClient.getInfoUsingGET({}); if (portalVersionResult && portalVersionResult.portalVersion) { - return Promise.resolve("v" + portalVersionResult.portalVersion.split('-')[0]); + let version = portalVersionResult.portalVersion.split('-')[0]; + if (!version.startsWith("v") { + version = `v${version}`; + } + return Promise.resolve(version); } return undefined; } From bc1a79ab052f785142bd2f23a9e2fe93da6eb77b Mon Sep 17 00:00:00 2001 From: Ino de Bruijn Date: Thu, 19 Dec 2019 17:38:01 -0500 Subject: [PATCH 2/2] fix typo --- src/AppStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppStore.ts b/src/AppStore.ts index e7192bbb85c..7a4ffd0eac3 100644 --- a/src/AppStore.ts +++ b/src/AppStore.ts @@ -80,7 +80,7 @@ export class AppStore { const portalVersionResult = await internalClient.getInfoUsingGET({}); if (portalVersionResult && portalVersionResult.portalVersion) { let version = portalVersionResult.portalVersion.split('-')[0]; - if (!version.startsWith("v") { + if (!version.startsWith("v")) { version = `v${version}`; } return Promise.resolve(version);