Skip to content

Commit

Permalink
Makes render() synchronous, since it doesn't exist on the ServiceWork…
Browse files Browse the repository at this point in the history
…er side
  • Loading branch information
Lcfvs committed Aug 4, 2021
1 parent 77ed974 commit b26b1a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const renderer = ({ document, parser, policy, source }) => {
context = { document, parser, policy, source }
}

return async template => {
return template => {
const cloned = clone(template, any)
const { [symbols.node]: node } = cloned

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.1",
"version": "5.1.0",
"description": "A composable DOM based template engine",
"type": "module",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Or
```js
import { render } from '@lcf.vs/dom-engine/lib/backend.js'

const htmlNode = await render(template)
const htmlNode = render(template)
```

### Front-End
Expand All @@ -182,7 +182,7 @@ Or
```js
import { render } from '@lcf.vs/dom-engine/lib/frontend.js'

const htmlNode = await render(template)
const htmlNode = render(template)
```

### ServiceWorker
Expand Down

0 comments on commit b26b1a0

Please sign in to comment.