From 7303f484e4519f6dbfd42bba629335dfcd8b2aa9 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 15 Apr 2024 01:43:18 -0400 Subject: [PATCH] run assert first --- dom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom.js b/dom.js index af73d6b..6d3ac19 100644 --- a/dom.js +++ b/dom.js @@ -13,10 +13,10 @@ const mapNode = aux => { }; const nodeMounter = (elem, e, before, aux) => { - aux = mapNode(aux); - assert(e.parentElement == null, "Cannot mount a dom node that has already been mounted elsewhere."); + + aux = mapNode(aux); elem?.insertBefore(e, before(getFirst)); return (val, newAux) => {