Fix YouTube videos when Google Api Key is not set (#3083)

Этот коммит содержится в:
enahum
2016-05-24 09:32:15 -03:00
коммит произвёл Joram Wilander
родитель ba5786d6a3
Коммит 32cb719895

Просмотреть файл

@@ -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'/>;
}