mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-16 02:26:24 -04:00
fix issue when switching repos while files refresh
This commit is contained in:
parent
c9ded489c9
commit
267da3b4db
|
|
@ -111,7 +111,13 @@ func (node *CommitFileNode) GetNodeAtIndex(index int, collapsedPaths map[string]
|
|||
return nil
|
||||
}
|
||||
|
||||
return getNodeAtIndex(node, index, collapsedPaths).(*CommitFileNode)
|
||||
result := getNodeAtIndex(node, index, collapsedPaths)
|
||||
if result == nil {
|
||||
// not sure how this can be nil: we probably are missing a mutex somewhere
|
||||
return nil
|
||||
}
|
||||
|
||||
return result.(*CommitFileNode)
|
||||
}
|
||||
|
||||
func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,13 @@ func (node *FileNode) GetNodeAtIndex(index int, collapsedPaths map[string]bool)
|
|||
return nil
|
||||
}
|
||||
|
||||
return getNodeAtIndex(node, index, collapsedPaths).(*FileNode)
|
||||
result := getNodeAtIndex(node, index, collapsedPaths)
|
||||
if result == nil {
|
||||
// not sure how this can be nil: we probably are missing a mutex somewhere
|
||||
return nil
|
||||
}
|
||||
|
||||
return result.(*FileNode)
|
||||
}
|
||||
|
||||
func (node *FileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue