widget: fix css regression

This commit is contained in:
jean-emmanuel 2025-02-16 15:13:57 +01:00
parent 0ab928efc2
commit 2a509adfa8
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- patchbay: layout issue
- widget: regression causing error when emptying the css property
## 1.27.4

View file

@ -1201,7 +1201,7 @@ class Widget extends EventEmitter {
var style = (unScopedCss ? prefix + '{' + unScopedCss + '}\n' : '') + scopedCss
style = style.trim()
if (this.style) {
if (this.style && this.container.contains(this.style)) {
if (style) this.style.innerText = style
else this.container.removeChild(this.style)
} else if (scopedCss.length || unScopedCss.length){