瀏覽代碼

Fixes #828 - Convert version fields to int before comparing it

main
Arunprasad Rajkumar 5 年之前
committed by Eric Amodio
父節點
當前提交
53e9cd12ee
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      src/extension.ts

+ 2
- 2
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

Loading…
取消
儲存