浏览代码

Fixes #751 - adds null ref protection

main
Eric Amodio 5 年前
父节点
当前提交
10f46a1884
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/git/gitService.ts

+ 2
- 2
src/git/gitService.ts 查看文件

@ -1764,7 +1764,7 @@ export class GitService implements Disposable {
skip === 0
? GitUri.fromFile(fileName, repoPath, ref)
: (await this.getPreviousUri(repoPath, uri, undefined, skip - 1))!;
if (current.sha === GitService.deletedOrMissingSha) return undefined;
if (current === undefined || current.sha === GitService.deletedOrMissingSha) return undefined;
return {
current: current,
@ -1777,7 +1777,7 @@ export class GitService implements Disposable {
skip === 0
? GitUri.fromFile(fileName, repoPath, ref)
: (await this.getPreviousUri(repoPath, uri, ref, skip - 1))!;
if (current.sha === GitService.deletedOrMissingSha) return undefined;
if (current === undefined || current.sha === GitService.deletedOrMissingSha) return undefined;
return {
current: current,

正在加载...
取消
保存