U4-11579 Take startNodeId into account before picking the current node to sync to

This commit is contained in:
Sebastiaan Janssen
2018-08-16 13:53:42 +02:00
parent d7a0886097
commit f18b0aa774

View File

@@ -162,7 +162,9 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
tree = args.tree;
if (node && node.path) {
var nodeHasPath = typeof node !== "undefined" && typeof node.path !== "undefined";
var startNodeNotDefined = typeof dialogOptions.startNodeId === "undefined" || dialogOptions.startNodeId === "" || dialogOptions.startNodeId === "-1";
if (startNodeNotDefined && nodeHasPath) {
$scope.dialogTreeEventHandler.syncTree({ path: node.path, activate: false });
}