aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-04-06 19:20:07 +0100
committerHayleigh Thompson <me@hayleigh.dev>2024-04-06 19:21:41 +0100
commit5c11037c17263d980a494e2ed5f08c45a5f3ea09 (patch)
tree76881a8226045a48aaf9294d9b75c8836efbc1d5
parent8a666a471fb7151462e4117d28d6dac152b727e1 (diff)
downloadlustre-5c11037c17263d980a494e2ed5f08c45a5f3ea09.tar.gz
lustre-5c11037c17263d980a494e2ed5f08c45a5f3ea09.zip
:bug: Fixed a bug where vdom incorrectly attempted keyed diffs.
-rw-r--r--src/vdom.ffi.mjs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vdom.ffi.mjs b/src/vdom.ffi.mjs
index 4abdb3d..07dc525 100644
--- a/src/vdom.ffi.mjs
+++ b/src/vdom.ffi.mjs
@@ -324,6 +324,7 @@ function createElementNode({ prev, next, dispatch, stack }) {
// All children are expected to be keyed if any of them are keyed, so just peeking
// the first child is enough to determine if we need to do a keyed diff.
if (
+ canMorph &&
firstChild !== undefined &&
// Explicit checks are more verbose but truthy checks force a bunch of comparisons
// we don't care about: it's never gonna be a number etc.