From 136189508b9a742e6b50e977d3a8677bc462d486 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Sat, 27 Nov 2021 17:04:31 +0000 Subject: [PATCH] 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. --- .../discourse/app/components/scrolling-post-stream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/scrolling-post-stream.js b/app/assets/javascripts/discourse/app/components/scrolling-post-stream.js index c634f0336eb..98ff4d775f4 100644 --- a/app/assets/javascripts/discourse/app/components/scrolling-post-stream.js +++ b/app/assets/javascripts/discourse/app/components/scrolling-post-stream.js @@ -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");