Merge pull request #3664 from matrix-org/dbkr/nullcheck_thumbnail_file

Null check on thumbnail_file
This commit is contained in:
David Baker 2019-11-22 16:59:15 +00:00 committed by GitHub
commit 7f7e51627c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,7 +88,7 @@ module.exports = createReactClass({
const content = this.props.mxEvent.getContent();
if (content.file !== undefined && this.state.decryptedUrl === null) {
let thumbnailPromise = Promise.resolve(null);
if (content.info.thumbnail_file) {
if (content.info && content.info.thumbnail_file) {
thumbnailPromise = decryptFile(
content.info.thumbnail_file,
).then(function(blob) {