Skip to content

Commit

Permalink
linking the source to the context
Browse files Browse the repository at this point in the history
  • Loading branch information
Lcfvs committed Jul 10, 2021
1 parent 152ecbf commit 77ed974
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ const resolve = (key, optional, template) => {
}, template)
}

export const renderer = ({ document, parser, policy }) => {
export const renderer = ({ document, parser, policy, source }) => {
if (!context) {
context = { document, parser, policy }
context = { document, parser, policy, source }
}

return async template => {
Expand All @@ -222,9 +222,9 @@ export const renderer = ({ document, parser, policy }) => {
}
}

export const serializer = ({ document, parser, policy, serializer }) => {
export const serializer = ({ document, parser, policy, serializer, source }) => {
if (!context) {
context = { document, parser, policy }
context = { document, parser, policy, source }
}

return async template => {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lcf.vs/dom-engine",
"version": "5.0.0",
"version": "5.0.1",
"description": "A composable DOM based template engine",
"type": "module",
"scripts": {
Expand Down

0 comments on commit 77ed974

Please sign in to comment.