Skip to content

Commit 41488b7

Browse files
author
Dave Newman
committed
clean up event bindings
1 parent 88478b8 commit 41488b7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/assets/javascripts/components/Chat.es6.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ class Chat extends React.Component {
176176

177177
componentWillUnmount() {
178178
$(this.refs.scrollable).unbind('mousewheel DOMMouseScroll')
179+
$(window).off('video-resize')
180+
$(window).off('video-time')
179181
}
180182

181183
componentWillUpdate() {

app/assets/javascripts/components/Video.es6.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ class Video extends React.Component {
3434
// this.jwplayer.on('all', this.onAll.bind(this))
3535
}
3636

37+
componentWillUnmount() {
38+
this.jwplayer.remove()
39+
}
40+
3741
render() {
3842
return (
3943
<div>

0 commit comments

Comments
 (0)