Skip to content

Commit

Permalink
Enforcing the toString() on values
Browse files Browse the repository at this point in the history
  • Loading branch information
Lcfvs committed Apr 26, 2021
1 parent 13457d0 commit 25b3ee8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function attribute (template, node) {
if (value === null) {
node.ownerElement.removeAttribute(node.nodeName)
} else {
node.nodeValue = value
node.nodeValue = `${value}`
}
}

Expand All @@ -42,7 +42,7 @@ function content (template, node) {
nodes.forEach(child => container.appendChild(render(child)))
node.parentNode.replaceChild(container, node)
} else {
node.textContent = value
node.textContent = `${value}`
}
}

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": "2.2.2",
"version": "2.2.3",
"description": "A composable DOM based template engine",
"type": "module",
"main": "lib/engine.js",
Expand Down

0 comments on commit 25b3ee8

Please sign in to comment.