diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:07:07 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:19:39 +0100 |
commit | afb9fba64be1f15a3ce3ed31214a704e73e5e8bb (patch) | |
tree | 6f69712a8c976178c05144483ff0c8e9b09445c8 /thirdparty/preact/src/h.js | |
parent | b37e7762bb5492cbd6788863232e7d2634ab5e5c (diff) | |
parent | 6e5fb04d3f3f9a6cd43ac20896d73321dd079f96 (diff) | |
download | wallet-core-afb9fba64be1f15a3ce3ed31214a704e73e5e8bb.tar.xz |
Update preact version
Diffstat (limited to 'thirdparty/preact/src/h.js')
-rw-r--r-- | thirdparty/preact/src/h.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/thirdparty/preact/src/h.js b/thirdparty/preact/src/h.js index e57ce4bde..c137bec84 100644 --- a/thirdparty/preact/src/h.js +++ b/thirdparty/preact/src/h.js @@ -2,8 +2,7 @@ import { VNode } from './vnode'; import options from './options'; -let stack = []; - +const stack = []; /** JSX/hyperscript reviver @@ -16,7 +15,8 @@ let stack = []; * render(<span>foo</span>, document.body); */ export function h(nodeName, attributes) { - let children, lastSimple, child, simple, i; + let children = [], + lastSimple, child, simple, i; for (i=arguments.length; i-- > 2; ) { stack.push(arguments[i]); } @@ -35,8 +35,7 @@ export function h(nodeName, attributes) { children[children.length-1] += child; } else { - if (children) children.push(child); - else children = [child]; + children.push(child); lastSimple = simple; } } |