Rewrite the restricted iterators and reorder the forward references. [skip build]
This commit is contained in:
@@ -41,7 +41,9 @@ const MAX_AUTO_PAGE_COUNT = 50;
|
||||
|
||||
export function buildParentByRoomId(rooms: Iterable<IHierarchyRoom>): Map<string, string> {
|
||||
const parentByRoomId = new Map<string, string>();
|
||||
for (const room of rooms) {
|
||||
const roomList = Array.from(rooms);
|
||||
for (let i = 0; i < roomList.length; i += 1) {
|
||||
const room = roomList[i];
|
||||
if (room?.room_id && Array.isArray(room.children_state)) {
|
||||
room.children_state.forEach((childState) => {
|
||||
if (childState?.type !== StateEvent.SpaceChild) return;
|
||||
|
||||
Reference in New Issue
Block a user