Pārlūkot izejas kodu

Fixes #751 - adds null ref protection

main
Eric Amodio pirms 5 gadiem
vecāks
revīzija
10f46a1884
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      src/git/gitService.ts

+ 2
- 2
src/git/gitService.ts Parādīt failu

@ -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,

Notiek ielāde…
Atcelt
Saglabāt