From 6852499d916897f7beebd0f2cccdd972b9239249 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 27 Feb 2014 18:19:12 +0000 Subject: [PATCH] Fix color widget failing if it had no value --- etemplate/js/et2_widget_color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_color.js b/etemplate/js/et2_widget_color.js index d150abae9f..fdfc9814ae 100644 --- a/etemplate/js/et2_widget_color.js +++ b/etemplate/js/et2_widget_color.js @@ -106,7 +106,7 @@ var et2_color = et2_inputWidget.extend( // Initialize jPicker - this.options.color.active = new jQuery.jPicker.Color({hex:this.value}); + this.options.color.active = new jQuery.jPicker.Color(this.value ? {hex:this.value} : {}); // Do this to get a reference to the actual jPicker used, so we can fully remove it in destroy() var list_id = jQuery.jPicker.List.length ? jQuery.jPicker.List.length : 0;