A platform for community discussion. Free, open, simple.
DEV: fix missing routeWillChange cleanup in scroll-direction service (#38633)
Isaac Janzen249a2c1c3490
diff --git a/frontend/discourse/app/services/scroll-direction.js b/frontend/discourse/app/services/scroll-direction.jsindex 865b3b87580..7f96bb64aca 100644--- a/frontend/discourse/app/services/scroll-direction.js+++ b/frontend/discourse/app/services/scroll-direction.js@@ -34,6 +34,7 @@ export default class ScrollDirection extends Service {willDestroy() {window.removeEventListener("scroll", this.onScroll);+ this.router.off("routeWillChange", this.routeWillChange);this.router.off("routeDidChange", this.routeDidChange);}