mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-31 02:25:35 +03:00
fix bug caused by interface
This commit is contained in:
@@ -89,6 +89,11 @@ func (m *CommitFileManager) ToggleCollapsed(path string) {
|
||||
}
|
||||
|
||||
func (m *CommitFileManager) Render(diffName string, patchManager *patch.PatchManager) []string {
|
||||
// can't rely on renderAux to check for nil because an interface won't be nil if its concrete value is nil
|
||||
if m.tree == nil {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
return renderAux(m.tree, m.collapsedPaths, "", -1, func(n INode, depth int) string {
|
||||
castN := n.(*CommitFileNode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user