From 6f152530d649cd6dcacecfc7e88a94e98028f911 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 9 Sep 2015 15:27:42 -0700 Subject: [PATCH] fix(message-toolbar): Handle scenario where toolbar items rapidly removed (Sentry 2861) --- internal_packages/message-list/lib/message-toolbar-items.cjsx | 1 + 1 file changed, 1 insertion(+) diff --git a/internal_packages/message-list/lib/message-toolbar-items.cjsx b/internal_packages/message-list/lib/message-toolbar-items.cjsx index 40248c300..b95ba5ca2 100644 --- a/internal_packages/message-list/lib/message-toolbar-items.cjsx +++ b/internal_packages/message-list/lib/message-toolbar-items.cjsx @@ -33,6 +33,7 @@ class MessageToolbarItems extends React.Component @_unsubscribers.push FocusedContentStore.listen @_onChange componentWillUnmount: => + return unless @_unsubscribers unsubscribe() for unsubscribe in @_unsubscribers _onChange: =>