Remove scroll listener on destroy so we don’t call undefined onScroll

/cc @izuzak because no PR, @as-cii because this fixes an unexpected
issue with your change.
This commit is contained in:
Nathan Sobo
2015-10-07 16:52:03 -05:00
parent 3636eb35d8
commit 8e834794a9

View File

@@ -13,6 +13,7 @@ class ScrollbarComponent
@domNode.addEventListener 'scroll', @onScrollCallback
destroy: ->
@domNode.removeEventListener 'scroll', @onScrollCallback
@onScroll = null
getDomNode: ->