aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-10-21 22:58:25 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-10-21 22:58:25 +0100
commitaeed86931c75987bd515c922f50c3f3d6dcee342 (patch)
tree5bc368a2d4dff55d701da3fe63c1d3635067ea72
parent23b4183f69e8534ec8761421eaaa0a6846eb71dd (diff)
downloadlustre-aeed86931c75987bd515c922f50c3f3d6dcee342.tar.gz
lustre-aeed86931c75987bd515c922f50c3f3d6dcee342.zip
:bug: Fixed a bug where components wouldn't morph properly.
-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;
}