From a0e7b91f4de51ba9e3e75920c1e3520d429850ff Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Mon, 3 Apr 2023 18:34:28 +0200 Subject: [PATCH] fix: watch only if Object.keys(self[attributeObserverSymbol].length > 0) --- application/source/dom/customelement.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/source/dom/customelement.mjs b/application/source/dom/customelement.mjs index 858cfd824..e57ff7e43 100644 --- a/application/source/dom/customelement.mjs +++ b/application/source/dom/customelement.mjs @@ -614,6 +614,10 @@ function initAttributeChangeMutationObserver() { if (self[attributeObserverSymbol] === undefined) { self[attributeObserverSymbol] = {}; } + + if(Object.keys(self[attributeObserverSymbol]).length === 0) { + return; + } new MutationObserver(function (mutations) { for (const mutation of mutations) { -- GitLab