Skip to content

Commit

Permalink
more null checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Aug 10, 2021
1 parent 13cdca0 commit 2375b00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/event-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class EventTimeline {
// have a membership event, so test to see if events.member is set. We
// check this to avoid overriding non-sentinel members by sentinel ones
// when adding the event to a filtered timeline
if (!event.sender?.events.member) {
if (!event.sender?.events?.member) {
event.sender = stateContext.getSentinelMember(event.getSender());
}
if (!event.target?.events.member && event.getType() === EventType.RoomMember) {
if (!event.target?.events?.member && event.getType() === EventType.RoomMember) {
event.target = stateContext.getSentinelMember(event.getStateKey());
}

Expand Down

0 comments on commit 2375b00

Please sign in to comment.