Skip to content

Commit 3aa8824

Browse files
committed
Adds protection
1 parent 64c3927 commit 3aa8824

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/gitService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,10 @@ export class GitService extends Disposable {
11141114
}
11151115
else {
11161116
if (repoPathOrUri instanceof GitUri) {
1117-
const repo = repositoryTree.get(repoPathOrUri.repoPath!);
1118-
if (repo !== undefined) return repo;
1117+
if (repoPathOrUri.repoPath) {
1118+
const repo = repositoryTree.get(repoPathOrUri.repoPath);
1119+
if (repo !== undefined) return repo;
1120+
}
11191121

11201122
path = repoPathOrUri.fsPath;
11211123
}

0 commit comments

Comments
 (0)