Make sure the media picker can survive a logout and subsequent login

This commit is contained in:
Kenn Jacobsen
2019-11-12 20:34:30 +01:00
parent 5528c721c7
commit 091b3844ad

View File

@@ -311,7 +311,7 @@ angular.module("umbraco")
// also make sure the node is not trashed
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder", path: node.path });
gotoFolder({ id: $scope.lastOpenedNode || $scope.startNodeId, name: "Media", icon: "icon-folder", path: node.path });
return true;
} else {
gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });