diff --git a/src/video/video.js b/src/video/video.js index 962daee..a1cd658 100644 --- a/src/video/video.js +++ b/src/video/video.js @@ -92,7 +92,9 @@ export default ( } componentWillUnmount() { - this.unbindEvents(); + if(this.el){ + this.unbindEvents(); + } } // Stop `this.el` from being null briefly on every render, @@ -102,8 +104,10 @@ export default ( } componentDidMount() { - this.videoEl = this.el.getElementsByTagName('video')[0]; - this.bindEventsToUpdateState(); + if(this.el){ + this.videoEl = this.el.getElementsByTagName('video')[0]; + this.bindEventsToUpdateState(); + } } render() {