Skip to content

Commit

Permalink
refactor: Apply PR suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Jovi De Croock <[email protected]>
  • Loading branch information
rschristian and JoviDeCroock committed Jul 16, 2024
1 parent 64ca5df commit 8b52a19
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/diff/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@ 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);
}
if (name[0] == 'a' || (name[0] == 'p' && name[5] == ':')) {
prefix = name.slice(0, 4);
name = name.slice(5);
}

o: if (name === 'style') {
Expand Down

0 comments on commit 8b52a19

Please sign in to comment.