瀏覽代碼

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,

Loading…
取消
儲存