Conform src/components/views/messages/* code to strictNullChecks (#10461)

This commit is contained in:
Michael Telatynski 2023-03-29 08:22:35 +01:00 committed by GitHub
parent 7cb90d0f78
commit cefd94859c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 109 additions and 96 deletions

View file

@ -36,7 +36,9 @@ export default class MImageReplyBody extends MImageBody {
}
const content = this.props.mxEvent.getContent<IMediaEventContent>();
const thumbnail = this.messageContent(this.state.contentUrl, this.state.thumbUrl, content, FORCED_IMAGE_HEIGHT);
const thumbnail = this.state.contentUrl
? this.messageContent(this.state.contentUrl, this.state.thumbUrl, content, FORCED_IMAGE_HEIGHT)
: undefined;
return <div className="mx_MImageReplyBody">{thumbnail}</div>;
}