[FIX] web_editor: allow to simulate a preview of a colorpicker reset

This is important so that trigger-value works
(see https://github.com/odoo/odoo/commit/e590609ebb429c6254766aa1fd8cab3ce3fd4c74)

closes odoo/odoo#43182

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-01-13 10:26:26 +00:00
parent 7c984d57e8
commit bc086e4c79
@@ -983,7 +983,10 @@ const ColorpickerUserValueWidget = SelectUserValueWidget.extend({
* @override
*/
getValue: function (methodName) {
return this._previewColor || this._super(...arguments);
if (typeof this._previewColor === 'string') {
return this._previewColor;
}
return this._super(...arguments);
},
/**
* @override