aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vdom.ffi.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vdom.ffi.mjs b/src/vdom.ffi.mjs
index 1c150ef..8d5c287 100644
--- a/src/vdom.ffi.mjs
+++ b/src/vdom.ffi.mjs
@@ -36,7 +36,7 @@ export function morph(prev, next, dispatch, isComponent = false) {
parent.appendChild(created);
out ??= created;
} else if (prev.nodeType === Node.TEXT_NODE) {
- prev.textContent = next.content;
+ if (prev.textContent !== next.content) prev.textContent = next.content;
out ??= prev;
} else {
const created = document.createTextNode(next.content);