fix weird `in` op behaviour with null

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-02-11 11:45:13 +00:00
parent 7bf05b0715
commit aeedf48d84
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 2 additions and 2 deletions

View File

@ -137,9 +137,9 @@ export default class Reply extends React.Component {
if (ev.isRedacted()) return;
const mRelatesTo = ev.getWireContent()['m.relates_to'];
if (mRelatesTo) {
if (mRelatesTo && mRelatesTo['m.in_reply_to']) {
const mInReplyTo = mRelatesTo['m.in_reply_to'];
if ('event_id' in mInReplyTo) return mInReplyTo;
if (mInReplyTo['event_id']) return mInReplyTo;
}
}