From fe0707535c17c000f3b224b99045888155d27deb Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 20 Oct 2015 17:46:11 +0100 Subject: [PATCH] binding makes no difference - put a null check in to catch the rogue exception --- src/skins/vector/views/molecules/voip/VideoView.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/views/molecules/voip/VideoView.js b/src/skins/vector/views/molecules/voip/VideoView.js index ab80219f77..d590d1befd 100644 --- a/src/skins/vector/views/molecules/voip/VideoView.js +++ b/src/skins/vector/views/molecules/voip/VideoView.js @@ -27,7 +27,7 @@ module.exports = React.createClass({ mixins: [VideoViewController], componentWillMount: function() { - dis.register(this.onAction.bind(this)); + dis.register(this.onAction); }, getRemoteVideoElement: function() { @@ -41,6 +41,9 @@ module.exports = React.createClass({ onAction: function(payload) { switch (payload.action) { case 'video_fullscreen': + if (!this.refs.container) { + return; + } var element = this.refs.container.getDOMNode(); var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; requestMethod.call(element);