Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix cannot read length of undefined for room upgrades (#7037)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Oct 26, 2021
1 parent 0fa9638 commit 39e61c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/RoomUpgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ export async function upgradeRoom(
spinnerModal = Modal.createDialog(Spinner, null, "mx_Dialog_spinner");
}

let toInvite: string[];
let toInvite: string[] = [];
if (inviteUsers) {
toInvite = [
...room.getMembersWithMembership("join"),
...room.getMembersWithMembership("invite"),
].map(m => m.userId).filter(m => m !== cli.getUserId());
}

let parentsToRelink: Room[];
let parentsToRelink: Room[] = [];
if (updateSpaces) {
parentsToRelink = Array.from(SpaceStore.instance.getKnownParents(room.roomId))
.map(roomId => cli.getRoom(roomId))
Expand Down

0 comments on commit 39e61c4

Please sign in to comment.