diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index c0b64e7d485..7a9c9f05ba9 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -7002,7 +7002,8 @@ registry.ImageTools = ImageHandlerOption.extend({ if (widgetName.startsWith('img-shape-color')) { const img = this._getImg(); const shapeName = img.dataset.shape; - if (!shapeName) { + const shapeColors = img.dataset.shapeColors; + if (!shapeName || !shapeColors) { return false; } const colors = img.dataset.shapeColors.split(';');