Fix the small mechanical rules. [skip build]
This commit is contained in:
@@ -564,10 +564,11 @@ export function TitleBar({ mx, children }: TitleBarProps) {
|
||||
|
||||
// Pick the best parent (or first if only one)
|
||||
const parentsList = Array.from(parents);
|
||||
const [firstParent] = parentsList;
|
||||
let chosenParent: string;
|
||||
|
||||
if (parentsList.length === 1) {
|
||||
chosenParent = parentsList[0];
|
||||
chosenParent = firstParent;
|
||||
} else {
|
||||
// Use heuristic to pick best parent
|
||||
// Prefer a parent that is itself a top-level space (orphan)
|
||||
@@ -577,7 +578,7 @@ export function TitleBar({ mx, children }: TitleBarProps) {
|
||||
chosenParent = guessPerfectParent(mx, currentRoomId, orphanParents) ?? orphanParents[0];
|
||||
} else {
|
||||
// All parents have parents themselves, just pick first and continue
|
||||
chosenParent = parentsList[0];
|
||||
chosenParent = firstParent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user