Skip to content

Commit

Permalink
Fix infinite event listener ping-pong destroying settings page (#1308)
Browse files Browse the repository at this point in the history
* Reject observer children updates from 'element'

* Revert logic order switch in _onObserverChildrenUpdated
  • Loading branch information
Kuuuube authored Aug 13, 2024
1 parent 4cae317 commit a7c19ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ext/js/dom/dom-data-binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,9 @@ export class DOMDataBinder {
* @param {import('dom-data-binder').ElementObserver<T>} observer
*/
_onObserverChildrenUpdated(element, observer) {
if (!observer.hasValue) {
return;
if (observer.hasValue && this._getNormalizedElementType(element) !== 'element') {
this._setElementValue(element, observer.value);
}
this._setElementValue(element, observer.value);
}

/**
Expand Down

0 comments on commit a7c19ce

Please sign in to comment.