mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Fix cannot read length of undefined for room upgrades (#7037)
This commit is contained in:
parent
0fa9638681
commit
39e61c4fa3
@ -50,7 +50,7 @@ export async function upgradeRoom(
|
||||
spinnerModal = Modal.createDialog(Spinner, null, "mx_Dialog_spinner");
|
||||
}
|
||||
|
||||
let toInvite: string[];
|
||||
let toInvite: string[] = [];
|
||||
if (inviteUsers) {
|
||||
toInvite = [
|
||||
...room.getMembersWithMembership("join"),
|
||||
@ -58,7 +58,7 @@ export async function upgradeRoom(
|
||||
].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))
|
||||
|
Loading…
Reference in New Issue
Block a user