Skip to content

Commit

Permalink
use nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspoehls committed Jan 27, 2024
1 parent d99f172 commit b02d30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/view/src/drivers/handlebars/handlebars-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class HandlebarsDriver extends ViewBaseDriver implements ViewEngine {
async renderWithLayout (view: string, data: any, viewConfig: ViewResponseConfig): Promise<string> {
const layout = await this.compile(this.baseLayout(viewConfig), { isLayout: true })

const context: any = data || {}
const context: any = data ?? {}
context.content = await this.renderView(view, data)

return layout(context)
Expand Down

0 comments on commit b02d30d

Please sign in to comment.