diff --git a/pkg/commands/models/file_change_node.go b/pkg/commands/models/file_change_node.go index d265b3f05..85ce2e298 100644 --- a/pkg/commands/models/file_change_node.go +++ b/pkg/commands/models/file_change_node.go @@ -95,7 +95,7 @@ func (s *FileChangeNode) getIndexForPathAux(path string, collapsedPaths map[stri } func (s *FileChangeNode) IsLeaf() bool { - return len(s.Children) == 0 + return s.File != nil } func (s *FileChangeNode) Size(collapsedPaths map[string]bool) int {