Null-guard m.video info

Fixes https://github.com/vector-im/riot-web/issues/4423
This commit is contained in:
lukebarnard 2017-06-26 22:22:03 +01:00
parent 447f93ba73
commit fbaa3de28b

View file

@ -79,7 +79,7 @@ module.exports = React.createClass({
const content = this.props.mxEvent.getContent();
if (content.file !== undefined) {
return this.state.decryptedThumbnailUrl;
} else if (content.info.thumbnail_url) {
} else if (content.info && content.info.thumbnail_url) {
return MatrixClientPeg.get().mxcUrlToHttp(content.info.thumbnail_url);
} else {
return null;