diff options
author | enahum <nahumhbl@gmail.com> | 2016-05-24 09:32:15 -0300 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-05-24 08:32:15 -0400 |
commit | 32cb71989534c12a5363f8836949827558422902 (patch) | |
tree | f7eb15add9e082b3d2dd1ea1040bb7ca06d8316a /webapp/components/youtube_video.jsx | |
parent | ba5786d6a37829410f34aaca01fec82d3a46a873 (diff) | |
download | chat-32cb71989534c12a5363f8836949827558422902.tar.gz chat-32cb71989534c12a5363f8836949827558422902.tar.bz2 chat-32cb71989534c12a5363f8836949827558422902.zip |
Fix YouTube videos when Google Api Key is not set (#3083)
Diffstat (limited to 'webapp/components/youtube_video.jsx')
-rw-r--r-- | webapp/components/youtube_video.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/components/youtube_video.jsx b/webapp/components/youtube_video.jsx index 04a10bc31..35b25e002 100644 --- a/webapp/components/youtube_video.jsx +++ b/webapp/components/youtube_video.jsx @@ -23,7 +23,7 @@ export default class YoutubeVideo extends React.Component { this.state = { loaded: false, - failed: global.window.mm_config.GoogleDeveloperKey === '', + failed: false, playing: false, title: '' }; @@ -133,6 +133,10 @@ export default class YoutubeVideo extends React.Component { } render() { + if (!global.window.mm_config.GoogleDeveloperKey) { + return <div/>; + } + if (!this.state.loaded) { return <div className='video-loading'/>; } |