Don't assume we have a valid event.
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
3656fdb571
commit
5c37155730
1 changed files with 2 additions and 2 deletions
|
@ -156,8 +156,8 @@ module.exports = React.createClass({
|
|||
}
|
||||
|
||||
const readPinsEvent = this.props.room.getAccountData("im.vector.room.read_pins");
|
||||
if (readPinsEvent) {
|
||||
const readStateEvents = readPinsEvent.getContent().event_ids;
|
||||
if (readPinsEvent && readPinsEvent.getContent()) {
|
||||
const readStateEvents = readPinsEvent.getContent().event_ids || [];
|
||||
if (readStateEvents) {
|
||||
return !readStateEvents.includes(currentPinEvent.getId());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue