File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ npm install pdf-made-easy
7171
7272### API
7373
74- - [ ] Make the ` getTemplateRenderer ` command argument optional
74+ - [x ] Make the ` getTemplateRenderer ` command argument optional
7575
7676## Contributing
7777
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export interface CommandArgs<T = LiquidOptions> extends BaseArgs {
5959 * Sets up and returns a function that renders HTML from a template string and data
6060 * object.
6161 */
62- getTemplateRenderer ( options ?: T ) : RenderTemplate ;
62+ getTemplateRenderer ? ( options ?: T ) : RenderTemplate ;
6363}
6464
6565/**
Original file line number Diff line number Diff line change @@ -112,7 +112,11 @@ export async function getBuilder() {
112112
113113 const html = await renderHTML (
114114 absolutizePath ( template , rootDir ) ,
115- getTemplateRenderer ( options ?. templateOptions ) ,
115+ ( getTemplateRenderer ?? getDefaultTemplateRenderer ) (
116+ // TODO: Fix type error
117+ // @ts -expect-error
118+ options ?. templateOptions
119+ ) ,
116120 await getData ( absolutizePath ( data , rootDir ) )
117121 ) ;
118122
You can’t perform that action at this time.
0 commit comments