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 = {
|
this.state = {
|
||||||
loaded: false,
|
loaded: false,
|
||||||
failed: global.window.mm_config.GoogleDeveloperKey === '',
|
failed: false,
|
||||||
playing: false,
|
playing: false,
|
||||||
title: ''
|
title: ''
|
||||||
};
|
};
|
||||||
@@ -133,6 +133,10 @@ export default class YoutubeVideo extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
if (!global.window.mm_config.GoogleDeveloperKey) {
|
||||||
|
return <div/>;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.state.loaded) {
|
if (!this.state.loaded) {
|
||||||
return <div className='video-loading'/>;
|
return <div className='video-loading'/>;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user