Skip to content

Commit

Permalink
Add support for null textContent
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623 committed Sep 26, 2023
1 parent 426d9e3 commit fbbf654
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/templatetemplate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function TemplateTemplate(template, insertions = {}) {
return currentNode.appendChild(insertion);
}

currentNode.textContent = insertion;
if (insertion !== null) {
currentNode.textContent = insertion;
}
});

return importedNode;
Expand Down

0 comments on commit fbbf654

Please sign in to comment.