diff --git a/app/RSpade/Core/SPA/Spa.js b/app/RSpade/Core/SPA/Spa.js index f343e80ec..3e5c7a46a 100755 --- a/app/RSpade/Core/SPA/Spa.js +++ b/app/RSpade/Core/SPA/Spa.js @@ -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;