Fixes broken refresh action

Refresh action referenced the tree, not its root node
This commit is contained in:
perploug
2014-01-27 22:08:40 +01:00
parent c2d978a0db
commit 05a8d80284

View File

@@ -39,8 +39,8 @@ function umbracoMenuActions($q, treeService, $location, navigationService, appSt
//to find a visible tree node, we'll go get the currently loaded root node from appState
var treeRoot = appState.getTreeState("currentRootNode");
if (treeRoot) {
var treeNode = treeService.getDescendantNode(treeRoot, args.entity.id, args.treeAlias);
if (treeRoot && treeRoot.root) {
var treeNode = treeService.getDescendantNode(treeRoot.root, args.entity.id, args.treeAlias);
if (treeNode) {
treeService.loadNodeChildren({ node: treeNode, section: args.section });
}