@@ -605,20 +605,20 @@ component
605605 }
606606 }
607607
608- // Discover the layout location + helpers
609- var layoutLocations = discoverViewPaths (
610- view : cbox_currentLayout ,
611- module : arguments .module ,
612- explicitModule : cbox_explicitModule ,
613- isLayout : true
614- );
608+ // Layout location holder — only populated when layout is non-empty.
609+ // discoverViewPaths throws on an empty layout name (regression vs ColdBox 7).
610+ var layoutLocations = { viewPath : " " , viewHelperPath : [] };
615611
616- // If Layout is blank, then just delegate to the view
617- // No layout rendering.
612+ // If Layout is blank, then just delegate to the view (no layout rendering).
618613 if ( len ( cbox_currentLayout ) eq 0 ) {
619614 iData .renderedLayout = this .view ();
620615 } else {
621- // Render the layout with it's helpers
616+ layoutLocations = discoverViewPaths (
617+ view : cbox_currentLayout ,
618+ module : arguments .module ,
619+ explicitModule : cbox_explicitModule ,
620+ isLayout : true
621+ );
622622 iData .renderedLayout = renderViewComposite (
623623 view : cbox_currentLayout ,
624624 viewPath : layoutLocations .viewPath ,
0 commit comments