dont assume there is a rooms section in the sync

This commit is contained in:
Bruno Windels 2021-05-06 12:10:10 +02:00
parent a28b2b74d2
commit 9e78f8382a

View File

@ -375,7 +375,7 @@ export class Sync {
_parseInvites(roomsSection) {
const inviteStates = [];
if (roomsSection.invite) {
if (roomsSection?.invite) {
for (const [roomId, roomResponse] of Object.entries(roomsSection.invite)) {
let invite = this._session.invites.get(roomId);
let isNewInvite = false;