From 2a509adfa8fceb211c906c20c31164cf2ac6694e Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 16 Feb 2025 15:13:57 +0100 Subject: [PATCH] widget: fix css regression --- CHANGELOG.md | 1 + src/client/widgets/common/widget.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a374072b..a704801e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - patchbay: layout issue + - widget: regression causing error when emptying the css property ## 1.27.4 diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index fe629c84..4b97f478 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -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){