Commit 9bd3b5d1 authored by abirembaut's avatar abirembaut Committed by benjaminParisel

fix(select widget) possible infinite loop when updating the value (#2586)

- avoid infite loop in case the value gets updated by several scripts

Covers [BS-191772](https://bonitasoft.atlassian.net/browse/BS-19177)
parent 47b20980
......@@ -58,8 +58,11 @@ function PbSelectCtrl($scope, $parse, $log, widgetNameFactory, $timeout, $window
var items = $scope.properties.availableValues;
if (Array.isArray(items)) {
var foundItem = ctrl.findSelectedItem(items);
ctrl.setSelectedValue(foundItem);
$timeout(function () {
if (!angular.isDefined(foundItem)) {
$scope.properties.value = null;
}
}, 0);
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment