DEV: Ensure scrolling-post-stream event listeners are removed correctly (#15115)

The method was switched from _debouncedScrollCallback to _debouncedScroll in ff72522f, but the cleanup was not updated to match.
This commit is contained in:
David Taylor
2021-11-27 17:04:31 +00:00
committed by GitHub
parent 1b184cefd0
commit 136189508b

View File

@@ -365,8 +365,8 @@ export default MountWidget.extend({
willDestroyElement() {
this._super(...arguments);
document.removeEventListener("touchmove", this._debouncedScrollCallback);
window.removeEventListener("scroll", this._debouncedScrollCallback);
document.removeEventListener("touchmove", this._debouncedScroll);
window.removeEventListener("scroll", this._debouncedScroll);
this.appEvents.off("post-stream:refresh", this, "_debouncedScroll");
$(this.element).off("mouseenter.post-stream");
$(this.element).off("mouseleave.post-stream");