Add a missing null check

This commit is contained in:
Travis Ralston 2018-12-13 14:29:12 -07:00
parent c6f35428d7
commit 63658e0441

View File

@ -257,7 +257,7 @@ module.exports = React.createClass({
if (!isInvite && isJoined && looksLikeDm) {
const selfId = MatrixClientPeg.get().getUserId();
const otherMember = this.props.room.currentState.getMembersExcept([selfId])[0];
if (otherMember.user && otherMember.user._unstable_statusMessage) {
if (otherMember && otherMember.user && otherMember.user._unstable_statusMessage) {
subtext = otherMember.user._unstable_statusMessage;
}
}