fix(message-toolbar): Handle scenario where toolbar items rapidly removed (Sentry 2861)

This commit is contained in:
Ben Gotow 2015-09-09 15:27:42 -07:00
parent 48f4667205
commit 6f152530d6

View file

@ -33,6 +33,7 @@ class MessageToolbarItems extends React.Component
@_unsubscribers.push FocusedContentStore.listen @_onChange
componentWillUnmount: =>
return unless @_unsubscribers
unsubscribe() for unsubscribe in @_unsubscribers
_onChange: =>