[v9.2.x] Navigation: Fix crash when Help is disabled (#59375)
Navigation: Set navtree to an empty array instead of null (#58919)
set navtree to an empty array instead of null
(cherry picked from commit 4aa5dea96b)
Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
This commit is contained in:
co-authored by
Leo
parent
6b64e4d192
commit
052fd5713d
@@ -220,6 +220,10 @@ func (s *ServiceImpl) GetNavTree(c *models.ReqContext, hasEditPerm bool, prefs *
|
||||
|
||||
navTree = s.addHelpLinks(navTree, c)
|
||||
|
||||
if len(navTree) < 1 {
|
||||
navTree = make([]*navtree.NavLink, 0)
|
||||
}
|
||||
|
||||
return navTree, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user