ts error fix

This commit is contained in:
mikhail.aheichyk 2022-12-20 12:52:31 +03:00
parent e0b6e52d9c
commit 7f0621e84d

View file

@ -523,9 +523,11 @@ export class StopGapWidget extends EventEmitter {
// Skip marker assignment if membership is 'invite', otherwise 'm.room.member' from // Skip marker assignment if membership is 'invite', otherwise 'm.room.member' from
// invitation room will assign it and new state events will be not forwarded to the widget // invitation room will assign it and new state events will be not forwarded to the widget
// because of empty timeline for invitation room and assigned marker. // because of empty timeline for invitation room and assigned marker.
const room = this.client.getRoom(ev.getRoomId()); if (ev.getRoomId()) {
if (room && room.getMyMembership() !== "invite") { const room = this.client.getRoom(ev.getRoomId());
this.readUpToMap[ev.getRoomId()] = ev.getId(); if (room && room.getMyMembership() !== "invite") {
this.readUpToMap[ev.getRoomId()] = ev.getId();
}
} }
const raw = ev.getEffectiveEvent(); const raw = ev.getEffectiveEvent();