Skip to content

Commit 3151156

Browse files
committed
Fixes a problem with stringifying undefined branches to `origin/undefined
(vscode-gitlens-private#43, #4177)
1 parent 707c7ae commit 3151156

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/git/utils/-webview/branch.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function getDefaultBranchName(
4848

4949
const integration = await remote.getIntegration();
5050
const defaultBranch = await integration?.getDefaultBranch?.(remote.provider.repoDesc, options);
51-
return `${remote.name}/${defaultBranch?.name}`;
51+
return defaultBranch && `${remote.name}/${defaultBranch?.name}`;
5252
}
5353

5454
export async function getTargetBranchName(

0 commit comments

Comments
 (0)