Fixes issue of moving an item to the root, it will throw a JS error because target.nodeType is null

This commit is contained in:
Shannon
2017-02-21 15:44:49 +11:00
parent febeb82d10
commit bc5e3b4d66

View File

@@ -483,7 +483,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
//we need to do a double sync here: first refresh the node where the content was moved,
// then refresh the node where the content was moved from
navigationService.syncTree({
tree: target.nodeType,
tree: target.nodeType ? target.nodeType : (target.metaData.treeAlias),
path: newPath,
forceReload: true,
activate: false