aboutsummaryrefslogtreecommitdiff
path: root/src/vdom.ffi.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdom.ffi.mjs')
-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 e77db89..2515eb4 100644
--- a/src/vdom.ffi.mjs
+++ b/src/vdom.ffi.mjs
@@ -268,7 +268,7 @@ function createElementNode({ prev, next, dispatch, stack }) {
// that all attributes should be set as properties too.
else {
el.setAttribute(name, value);
- el[name] = value;
+ if (name in el) el[name] = value;
// If we're morphing an element we remove this attribute's name from the set
// of attributes that were on the previous render so we don't remove it in
// the next step.