From 53e9cd12ee716efb663a4e68e279c54177793f67 Mon Sep 17 00:00:00 2001 From: Arunprasad Rajkumar Date: Mon, 26 Aug 2019 12:22:22 +0530 Subject: [PATCH] Fixes #828 - Convert version fields to int before comparing it --- src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 76eef68..e9ed488 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -177,8 +177,8 @@ async function showWelcomePage(version: string, previousVersion: string | undefi Logger.log(`GitLens upgraded from v${previousVersion} to v${version}`); } - const [major, minor] = version.split('.'); - const [prevMajor, prevMinor] = previousVersion.split('.'); + const [major, minor] = version.split('.').map(v => parseInt(v)); + const [prevMajor, prevMinor] = previousVersion.split('.').map(v => parseInt(v)); if ( (major === prevMajor && minor === prevMinor) || // Don't notify on downgrades