Fix _collect_all_layouts() to find sublayouts on $content element

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-03 23:34:05 +00:00
parent d8b6a6d498
commit 273ea90a84

View File

@@ -889,14 +889,12 @@ class Spa {
layouts.push(current);
// Look for nested layout in $content
// Note: Sublayouts are placed directly ON the $content element (container becomes component)
const $content = current.$sid ? current.$sid('content') : null;
if (!$content || !$content.length) break;
const $child = $content.children().first();
if (!$child.length) break;
const child_component = $child.component();
if (child_component && child_component instanceof Spa_Layout) {
const child_component = $content.component();
if (child_component && child_component !== current && child_component instanceof Spa_Layout) {
current = child_component;
} else {
break;