Skip to content

Commit 57725e7

Browse files
authored
Merge pull request #343 from vector-im/bwindels/fix-sync-rooms-section-missing
Dont assume there is a rooms section in the sync
2 parents a28b2b7 + 9e78f83 commit 57725e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/matrix/Sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export class Sync {
375375

376376
_parseInvites(roomsSection) {
377377
const inviteStates = [];
378-
if (roomsSection.invite) {
378+
if (roomsSection?.invite) {
379379
for (const [roomId, roomResponse] of Object.entries(roomsSection.invite)) {
380380
let invite = this._session.invites.get(roomId);
381381
let isNewInvite = false;

0 commit comments

Comments
 (0)