Fixes: U4-4051 Bug when querying for root node with the remembered node id
This commit is contained in:
@@ -179,7 +179,7 @@ angular.module("umbraco")
|
||||
//default root item
|
||||
if (!$scope.target) {
|
||||
|
||||
if($scope.lastOpenedNode) {
|
||||
if($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) {
|
||||
|
||||
entityResource.getById($scope.lastOpenedNode, "media")
|
||||
.then(function(node){
|
||||
@@ -187,13 +187,15 @@ angular.module("umbraco")
|
||||
// make sure that las opened node is on the same path as start node
|
||||
var nodePath = node.path.split(",");
|
||||
|
||||
if(nodePath.indexOf($scope.startNodeId) !== -1) {
|
||||
if(nodePath.indexOf($scope.startNodeId.toString()) !== -1) {
|
||||
$scope.gotoFolder({id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder"});
|
||||
} else {
|
||||
$scope.gotoFolder({id: $scope.startNodeId, name: "Media", icon: "icon-folder"});
|
||||
}
|
||||
|
||||
});
|
||||
}, function (err) {
|
||||
$scope.gotoFolder({id: $scope.startNodeId, name: "Media", icon: "icon-folder"});
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user