Skip to content

Commit

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

* Revert logic order switch in _onObserverChildrenUpdated

<rikaitan.link>YTdjMTljZTlhMDQ1ZWM0ZmI2OTM0ZDUwMDA2NDIxZGIzZTVkZmUzZQo=</rikaitan.link>
  • Loading branch information
jason-ojisan committed Aug 14, 2024
1 parent f8f6aa9 commit e3c724c
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 e3c724c

Please sign in to comment.