diff --git a/addons/web/static/src/core/colorpicker/colorpicker.js b/addons/web/static/src/core/colorpicker/colorpicker.js index a6bb93647d2..b9f3177a2d0 100644 --- a/addons/web/static/src/core/colorpicker/colorpicker.js +++ b/addons/web/static/src/core/colorpicker/colorpicker.js @@ -85,6 +85,14 @@ export class Colorpicker extends Component { this.start(); }); onWillUpdateProps((newProps) => { + if (!this.el) { + // There is legacy code that can trigger the instantiation of the + // link tool when one of it's parent component is not in the dom. If + // that parent element is not in the dom, owl will not return + // `this.linkComponentWrapperRef.el` because of a check (see + // `inOwnerDocument`). + return; + } if (newProps.selectedColor) { this.setSelectedColor(newProps.selectedColor); }