diff --git a/internal_packages/undo-redo/lib/undo-redo-component.cjsx b/internal_packages/undo-redo/lib/undo-redo-component.cjsx index 734b54dda..7efe6c10f 100644 --- a/internal_packages/undo-redo/lib/undo-redo-component.cjsx +++ b/internal_packages/undo-redo/lib/undo-redo-component.cjsx @@ -28,7 +28,7 @@ class UndoRedoComponent extends React.Component clearTimeout(@_timeout) _setNewTimeout: => - clearTimeout(@_timeout) + @_clearTimeout() @_timeout = setTimeout (=> @_hide() return @@ -43,10 +43,11 @@ class UndoRedoComponent extends React.Component return {show: s, task: t} componentWillMount: -> - @unsub = UndoRedoStore.listen(@_onChange) + @_unsubscribe = UndoRedoStore.listen(@_onChange) componentWillUnmount: -> - @unsub() + @_clearTimeout() + @_unsubscribe() render: => items = [].concat(@_renderUndoRedoManager())