AppPlugins: Support app plugins with only default nav (#43016)

This commit is contained in:
Torkel Ödegaard
2021-12-13 14:06:15 +01:00
committed by GitHub
parent 597148f23b
commit 0e88f5db85

View File

@@ -126,6 +126,10 @@ func (hs *HTTPServer) getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error)
}
if len(appLink.Children) > 0 {
// If we only have one child and it's the app default nav then remove it from children
if len(appLink.Children) == 1 && appLink.Children[0].Url == appLink.Url {
appLink.Children = []*dtos.NavLink{}
}
appLinks = append(appLinks, appLink)
}
}