diff --git a/client/src/ui/dom.js b/client/src/ui/dom.js index 330ca962..38f9ec05 100644 --- a/client/src/ui/dom.js +++ b/client/src/ui/dom.js @@ -40,12 +40,15 @@ class DOMObserver { } observerCallback(mutations) { - this.subscriptions.forEach(sub => { + for (let sub of this.subscriptions) { try { const f = mutations.find(sub.filter); - if (f) sub.callback(f); - } catch (err) { } - }); + if (f) { + sub.callback(f); + continue; + } + } catch(err) {} + } } observe() {