Fix YouTube videos when Google Api Key is not set (#3083)
Этот коммит содержится в:
коммит произвёл
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'/>;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user