diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-23 19:38:20 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-23 19:38:20 +0100 |
commit | 6696e8300b574df5ea8b9a9c7280c397949f65b7 (patch) | |
tree | 299611f366fe4f4f7393812f21ef8824fbe073c4 | |
parent | 726a5b931104260ad17c3cf08d5a40c903fced97 (diff) | |
download | lustre-6696e8300b574df5ea8b9a9c7280c397949f65b7.tar.gz lustre-6696e8300b574df5ea8b9a9c7280c397949f65b7.zip |
:bug: Fixed a bug where dom patching would break on elements with unexpected children.
-rw-r--r-- | src/runtime.ffi.mjs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime.ffi.mjs b/src/runtime.ffi.mjs index a29055d..7325583 100644 --- a/src/runtime.ffi.mjs +++ b/src/runtime.ffi.mjs @@ -142,9 +142,10 @@ function morphElement(prev, curr, ns, parent) { while (prevChild) { if (currChild.head) { + const next = prevChild.nextSibling; morph(prevChild, currChild.head, prev); currChild = currChild.tail; - prevChild = prevChild.nextSibling; + prevChild = next; } else { const next = prevChild.nextSibling; prevChild.remove(); |