mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
fix: guard against nil remote branch in presentation layer
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
This commit is contained in:
parent
2f6d20275a
commit
988444c9dc
|
|
@ -9,6 +9,12 @@ import (
|
|||
|
||||
func GetRemoteBranchListDisplayStrings(branches []*models.RemoteBranch, diffName string) [][]string {
|
||||
return lo.Map(branches, func(branch *models.RemoteBranch, _ int) []string {
|
||||
if branch == nil {
|
||||
if icons.IsIconEnabled() {
|
||||
return []string{"", ""}
|
||||
}
|
||||
return []string{""}
|
||||
}
|
||||
diffed := branch.FullName() == diffName
|
||||
return getRemoteBranchDisplayStrings(branch, diffed)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue