diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index c6fc02a5..fe629c84 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -1199,9 +1199,11 @@ class Widget extends EventEmitter { var style = (unScopedCss ? prefix + '{' + unScopedCss + '}\n' : '') + scopedCss + style = style.trim() if (this.style) { - this.style.innerText = style + if (style) this.style.innerText = style + else this.container.removeChild(this.style) } else if (scopedCss.length || unScopedCss.length){ this.style = html`` this.container.insertBefore(this.style, this.container.childNodes[0] || null)