From 85f218d09625d3939179fb0e5aa694de7cf76adf Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 2 Oct 2024 20:36:05 +0200 Subject: [PATCH] Performance test for array deopt --- src/diff/props.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/diff/props.js b/src/diff/props.js index 316146f0fd..7d0960765a 100644 --- a/src/diff/props.js +++ b/src/diff/props.js @@ -135,7 +135,10 @@ export function setProperty(dom, name, value, oldValue, namespace) { if (typeof value == 'function') { // never serialize functions as attribute values - } else if (value != null && (value !== false || name[4] === '-')) { + } else if ( + value != null && + (value !== false || (name.length > 4 && name[4] === '-')) + ) { dom.setAttribute(name, name == 'popover' && value == true ? '' : value); } else { dom.removeAttribute(name);