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 c5dd0fd7c25..dcce62f367a 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 @@ -38,7 +38,6 @@ const ColorPaletteWidget = Widget.extend({ */ init: function (parent, options) { this._super.apply(this, arguments); - this.customColorsArray = [].concat(...customColors); this.style = window.getComputedStyle(document.documentElement); this.options = _.extend({ selectedColor: false, @@ -254,9 +253,7 @@ const ColorPaletteWidget = Widget.extend({ return; } this.el.querySelectorAll('.o_custom_color').forEach(el => el.remove()); - const existingColors = new Set(this.customColorsArray.concat( - Object.keys(this.colorToColorNames) - )); + const existingColors = new Set(Object.keys(this.colorToColorNames)); this.trigger_up('get_custom_colors', { onSuccess: (colors) => { colors.forEach(color => {