VideoView: Fix a dispatcher leak
Make sure we unregister from the dispatcher when the videoview goes away.pull/21833/head
parent
49c1d39f93
commit
0d0a379cd8
|
@ -25,8 +25,12 @@ var dis = require('../../../dispatcher');
|
|||
module.exports = React.createClass({
|
||||
displayName: 'VideoView',
|
||||
|
||||
componentWillMount: function() {
|
||||
dis.register(this.onAction);
|
||||
componentDidMount: function() {
|
||||
this.dispatcherRef = dis.register(this.onAction);
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
dis.unregister(this.dispatcherRef);
|
||||
},
|
||||
|
||||
getRemoteVideoElement: function() {
|
||||
|
|
Loading…
Reference in New Issue