Skip to content

Commit

Permalink
fix: register ctx.view as a singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 22, 2023
1 parent 93463e6 commit 23ccfc0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions providers/edge_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ export default class EdgeServiceProvider {
/**
* Creating a isolated instance of edge renderer
*/
HttpContext.getter('view', function (this: HttpContext) {
return edge.createRenderer().share({
request: this.request,
})
})
HttpContext.getter(
'view',
function (this: HttpContext) {
return edge.createRenderer().share({
request: this.request,
})
},
true
)

/**
* Adding brisk route to render templates without an
Expand Down

0 comments on commit 23ccfc0

Please sign in to comment.