mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-17 02:51:47 -05:00
Fixes error when there is no branches yet
This commit is contained in:
@@ -17,9 +17,10 @@ export class ShowQuickCurrentBranchHistoryCommand extends ActiveEditorCachedComm
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const branch = (await this.git.getBranch(this.git.repoPath)).name;
|
const branch = await this.git.getBranch(this.git.repoPath);
|
||||||
|
if (!branch) return undefined;
|
||||||
|
|
||||||
return commands.executeCommand(Commands.ShowQuickBranchHistory, uri, branch, undefined, goBackCommand);
|
return commands.executeCommand(Commands.ShowQuickBranchHistory, uri, branch.name, undefined, goBackCommand);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error(ex, 'ShowQuickCurrentBranchHistoryCommand');
|
Logger.error(ex, 'ShowQuickCurrentBranchHistoryCommand');
|
||||||
|
|||||||
Reference in New Issue
Block a user