mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
handle nil properly with file nodes
This commit is contained in:
@ -17,5 +17,9 @@ func NewCommitFileNode(node *Node[models.CommitFile]) *CommitFileNode {
|
||||
|
||||
// returns the underlying node, without any commit-file-specific methods attached
|
||||
func (self *CommitFileNode) Raw() *Node[models.CommitFile] {
|
||||
if self == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return self.Node
|
||||
}
|
||||
|
Reference in New Issue
Block a user