Do not normalise component children on ingestion (#2155)

* Do not normalise component children on ingestion

* Don't normalise vnode children

* Component hyperscript tests: children aren't normalised

* test, not text

* Update change log: #2155 & #2064
This commit is contained in:
Barney Carroll 2018-05-29 10:53:16 +01:00 committed by GitHub
parent 0f498e0aec
commit 1579fe8430
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 15 deletions

View file

@ -100,12 +100,10 @@ function hyperscript(selector) {
while (start < arguments.length) children.push(arguments[start++])
}
var normalized = Vnode.normalizeChildren(children)
if (typeof selector === "string") {
return execSelector(selectorCache[selector] || compileSelector(selector), attrs, normalized)
return execSelector(selectorCache[selector] || compileSelector(selector), attrs, Vnode.normalizeChildren(children))
} else {
return Vnode(selector, attrs.key, attrs, normalized)
return Vnode(selector, attrs.key, attrs, children)
}
}