diff --git a/client/js/controls/post_edit_sidebar_control.js b/client/js/controls/post_edit_sidebar_control.js index c6b7c226..b8ad9dab 100644 --- a/client/js/controls/post_edit_sidebar_control.js +++ b/client/js/controls/post_edit_sidebar_control.js @@ -236,10 +236,12 @@ class PostEditSidebarControl extends events.EventTarget { ); } - this._poolControl.addEventListener("change", (e) => { - this.dispatchEvent(new CustomEvent("change")); - this._syncExpanderTitles(); - }); + if (this._poolControl) { + this._poolControl.addEventListener("change", (e) => { + this.dispatchEvent(new CustomEvent("change")); + this._syncExpanderTitles(); + }); + } } _syncExpanderTitles() {