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:
parent
0f498e0aec
commit
1579fe8430
6 changed files with 59 additions and 15 deletions
|
|
@ -8,9 +8,10 @@ Vnode.normalize = function(node) {
|
|||
if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined)
|
||||
return node
|
||||
}
|
||||
Vnode.normalizeChildren = function normalizeChildren(children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
children[i] = Vnode.normalize(children[i])
|
||||
Vnode.normalizeChildren = function normalizeChildren(input) {
|
||||
var children = []
|
||||
for (var i = 0; i < input.length; i++) {
|
||||
children[i] = Vnode.normalize(input[i])
|
||||
}
|
||||
return children
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue