From 62463ecc21c741085100b83bc22caad75dacc7b6 Mon Sep 17 00:00:00 2001 From: Mathieu Deslauriers Date: Mon, 18 Feb 2019 08:41:12 -0500 Subject: [PATCH] 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. --- .../views/propertyeditors/colorpicker/colorpicker.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js index 9b38be4791..403f409299 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js @@ -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.