Fixes #3993 Recent changes in color picker has caused incompatibility with existing picker
This commit is contained in:
@@ -123,6 +123,11 @@ function ColorPickerController($scope) {
|
||||
if (!$scope.model.value)
|
||||
return false;
|
||||
|
||||
// Backwards compatibility, the color used to be stored as a hex value only
|
||||
if ($scope.model.value.length === 6) {
|
||||
$scope.model.value = { value: $scope.model.value, label: $scope.model.value };
|
||||
}
|
||||
|
||||
// Complex color (value and label)?
|
||||
if (!$scope.model.value.hasOwnProperty("value"))
|
||||
return $scope.model.value === color.value;
|
||||
|
||||
Reference in New Issue
Block a user