From 3f92ec53b36111852242f2c3305c3ca868379787 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Mon, 24 Jun 2024 22:07:02 -0500 Subject: [PATCH] junk: Is the first letter guard worth it --- src/diff/props.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/diff/props.js b/src/diff/props.js index 429ad643e7..81812edeee 100644 --- a/src/diff/props.js +++ b/src/diff/props.js @@ -36,13 +36,11 @@ let eventClock = 0; */ export function setProperty(dom, name, value, oldValue, namespace) { let useCapture, prefix; - if (name[0] == 'a' || name[0] == 'p') { - let idx = name.indexOf(':'); - if (idx > -1) { - // Only slices here, should be faster than array allocation - prefix = name.slice(0, idx); - name = name.slice(idx + 1); - } + let idx = name.indexOf(':'); + if (idx > -1) { + // Only slices here, should be faster than array allocation + prefix = name.slice(0, idx); + name = name.slice(idx + 1); } o: if (name === 'style') {