Skip to content

Commit 58ff472

Browse files
committed
refactor: update extension.ts
1 parent 264440d commit 58ff472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function _validateFoundRepos(git: API) {
3232
async function _handleRepos(
3333
git: API,
3434
sourceControl: vscode.SourceControl
35-
): Promise<Repository | undefined> {
35+
): Promise<Repository | false> {
3636
const selectedRepo = git.repositories.find(repository => {
3737
const uri = sourceControl.rootUri;
3838
if (!uri) {
@@ -44,7 +44,7 @@ async function _handleRepos(
4444
return repoPath === uri.path;
4545
});
4646

47-
return selectedRepo;
47+
return selectedRepo ?? false;
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)