Fix the mechanical style rules. [skip build]

This commit is contained in:
2026-11-01 09:01:32 +11:00
parent 831ce01150
commit 9591d8d01b
42 changed files with 762 additions and 756 deletions
+6 -5
View File
@@ -42,11 +42,12 @@ 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) {
if (!room?.room_id || !Array.isArray(room.children_state)) continue;
for (const childState of room.children_state) {
if (childState?.type !== StateEvent.SpaceChild) continue;
if (typeof childState.state_key !== 'string') continue;
parentByRoomId.set(childState.state_key, room.room_id);
if (room?.room_id && Array.isArray(room.children_state)) {
room.children_state.forEach((childState) => {
if (childState?.type !== StateEvent.SpaceChild) return;
if (typeof childState.state_key !== 'string') return;
parentByRoomId.set(childState.state_key, room.room_id);
});
}
}
return parentByRoomId;