Skip to content

Commit 2ef872d

Browse files
committed
Addendum to preactjs#677, avoid repeated access to dynamic key
1 parent 2217979 commit 2ef872d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/vdom/diff.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,10 @@ function idiff(dom, vnode, context, mountAll, componentRoot) {
123123

124124

125125
let fc = out.firstChild,
126-
props,
126+
props = out[ATTR_KEY],
127127
vchildren = vnode.children;
128128

129-
if (out[ATTR_KEY]) {
130-
props = out[ATTR_KEY];
131-
}
132-
else {
129+
if (props==null) {
133130
props = out[ATTR_KEY] = {};
134131
for (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;
135132
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy