Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nefsen402 committed Apr 15, 2024
1 parent 5da3b17 commit 8793dad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ const nodeMounter = (elem, e, before, aux) => {
};

const primitiveMounter = (elem, e, before) => {
e = document.createTextNode(e);

assert(elem, "Trying to mount a primitive to a null mount.");
elem.insertBefore(e, before(getFirst));
elem.insertBefore(e = document.createTextNode(e), before(getFirst));

return val => {
if (!e || val === getFirst) return e;
Expand Down

0 comments on commit 8793dad

Please sign in to comment.