diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js b/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js index 9177863e758..f6e66dc7c69 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js @@ -274,7 +274,9 @@ const ColorPaletteWidget = Widget.extend({ } this._buildCustomColors(); this._markSelectedColor(); - this.colorPicker.setSelectedColor(colorInfo.color); + if (this.colorPicker) { + this.colorPicker.setSelectedColor(colorInfo.color); + } }, /** * Mark the selected color