Skip to content

Commit 3bec0b5

Browse files
authored
BOX-146 - Fix for using unstarted Renderer instance
1 parent b500f9f commit 3bec0b5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

models/Mail.cfc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ component accessors="true" {
1717
// DI
1818
property name="wirebox" inject="wirebox";
1919

20+
property name="renderer" inject="coldbox:renderer";
21+
2022
/**
2123
* The config struct representing the mail payload which is sent to the configured protocol in the mail service
2224
*/
@@ -457,9 +459,7 @@ component accessors="true" {
457459

458460
// Do we have a layout?
459461
if ( !isNull( arguments.layout ) && len( arguments.layout ) ) {
460-
variables.config.body = variables.wirebox
461-
.getInstance( "Renderer@coldbox" )
462-
.layout(
462+
variables.config.body = variables.renderer.layout(
463463
layout : arguments.layout,
464464
module : arguments.layoutModule,
465465
view : arguments.view,
@@ -469,9 +469,7 @@ component accessors="true" {
469469
}
470470
// Else, plain view rendering
471471
else {
472-
variables.config.body = variables.wirebox
473-
.getInstance( "Renderer@coldbox" )
474-
.view(
472+
variables.config.body = variables.renderer.view(
475473
view : arguments.view,
476474
args : arguments.args,
477475
module: arguments.module

0 commit comments

Comments
 (0)