Issue 4634 : Fixed colorpicker unselection condition
When the user remove the selection the model is set to null. When the user tries to select another value after that, the condition is trying to check the "value" property for a null object.
This commit is contained in:
committed by
Sebastiaan Janssen
parent
3a469cdc77
commit
62463ecc21
@@ -76,7 +76,7 @@ function ColorPickerController($scope, angularHelper) {
|
||||
|
||||
$scope.onSelect = function (color) {
|
||||
// did the value change?
|
||||
if ($scope.model.value.value === color) {
|
||||
if ($scope.model.value != null && $scope.model.value.value === color) {
|
||||
// User clicked the currently selected color
|
||||
// to remove the selection, they don't want
|
||||
// to select any color after all.
|
||||
|
||||
Reference in New Issue
Block a user