diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-06 19:20:07 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-04-06 19:20:07 +0100 |
commit | e4b3ebd1264dfe94fbf91393dd2f04b14358952a (patch) | |
tree | a2cc07f2fb0e611bd72fc6944cfc063b4afc66ea | |
parent | c7df826e1023809a6bd3521d472a3d24a80d6146 (diff) | |
download | lustre-e4b3ebd1264dfe94fbf91393dd2f04b14358952a.tar.gz lustre-e4b3ebd1264dfe94fbf91393dd2f04b14358952a.zip |
:bug: Fixed a bug where vdom incorrectly attempted keyed diffs.
-rw-r--r-- | src/vdom.ffi.mjs | 1 |
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. |