diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index 982df96..fd10bcf 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -908,7 +908,7 @@ export class GitProviderService implements Disposable { if (typeof pathOrFile === 'string') { path = pathOrFile; } else { - path = pathOrFile!.originalPath ?? pathOrFile!.path; + path = pathOrFile?.originalPath ?? pathOrFile?.path ?? ''; } } else { ref = refOrUri.sha;