Skip to content

Commit

Permalink
Performance test for array deopt
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Oct 2, 2024
1 parent 79303ec commit 85f218d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/diff/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 85f218d

Please sign in to comment.