Skip to content

Commit cb32d4c

Browse files
authored
Merge pull request #657 from GunnarLieb/patch-8
Renderer.renderLayout throws "LayoutNotFoundException"
2 parents 28b1d8a + d4d32e1 commit cb32d4c

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

system/web/Renderer.cfc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)