aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/runtime.ffi.mjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime.ffi.mjs b/src/runtime.ffi.mjs
index 28516ac..03e741a 100644
--- a/src/runtime.ffi.mjs
+++ b/src/runtime.ffi.mjs
@@ -79,10 +79,10 @@ function createElement(prev, curr, ns, dispatch, parent = null) {
el.appendChild(morph(null, child.head, dispatch, el));
child = child.tail;
}
-
- if (prev) prev.replaceWith(el);
}
+ if (prev) prev.replaceWith(el);
+
return el;
}