Fix bug, in multiurlpicker where you cannot deselect a selected entity.

This commit is contained in:
Lucas Bach Bisgaard
2023-03-29 09:38:27 +02:00
committed by Laura Neto
parent e30587f90d
commit 3385947c4e

View File

@@ -128,6 +128,13 @@ angular.module("umbraco").controller("Umbraco.Editors.LinkPickerController",
eventsService.emit("dialogs.linkPicker.select", args);
if ($scope.currentNode) {
if ($scope.currentNode.id == args.node.id && $scope.currentNode.selected) {
$scope.model.target = {};
$scope.currentNode.selected = false;
return;
}
//un-select if there's a current one selected
$scope.currentNode.selected = false;
}