mirror of https://github.com/vector-im/riot-web
Don't assume we have a valid event.
Signed-off-by: Travis Ralston <travpc@gmail.com>pull/21833/head
parent
3656fdb571
commit
5c37155730
|
@ -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 New Issue