mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-19 12:12:42 +02:00
safer code
This commit is contained in:
parent
bdf2b2d5c4
commit
44896bcd51
@ -115,6 +115,10 @@ func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (node *CommitFileNode) Size(collapsedPaths map[string]bool) int {
|
func (node *CommitFileNode) Size(collapsedPaths map[string]bool) int {
|
||||||
|
if node == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
return size(node, collapsedPaths)
|
return size(node, collapsedPaths)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +101,10 @@ func (node *FileNode) GetIndexForPath(path string, collapsedPaths map[string]boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (node *FileNode) Size(collapsedPaths map[string]bool) int {
|
func (node *FileNode) Size(collapsedPaths map[string]bool) int {
|
||||||
|
if node == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
return size(node, collapsedPaths)
|
return size(node, collapsedPaths)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user