about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/notifications/index.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/notifications/index.js b/app/javascript/mastodon/features/notifications/index.js
index 35b430bfb..77abfae25 100644
--- a/app/javascript/mastodon/features/notifications/index.js
+++ b/app/javascript/mastodon/features/notifications/index.js
@@ -50,6 +50,13 @@ export default class Notifications extends React.PureComponent {
     trackScroll: true,
   };
 
+  componentWillUnmount () {
+    this.handleScrollToBottom.cancel();
+    this.handleScrollToTop.cancel();
+    this.handleScroll.cancel();
+    this.props.dispatch(scrollTopNotifications(false));
+  }
+
   handleScrollToBottom = debounce(() => {
     this.props.dispatch(scrollTopNotifications(false));
     this.props.dispatch(expandNotifications());