|
@@ -16,9 +16,6 @@ import { isFalse, isTrue, isDef, isUndef, isPrimitive } from 'shared/util'
|
|
|
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
|
|
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
|
|
|
// because functional components already normalize their own children.
|
|
// because functional components already normalize their own children.
|
|
|
export function simpleNormalizeChildren (children: any) {
|
|
export function simpleNormalizeChildren (children: any) {
|
|
|
- if (!Array.isArray(children)) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
for (let i = 0; i < children.length; i++) {
|
|
for (let i = 0; i < children.length; i++) {
|
|
|
if (Array.isArray(children[i])) {
|
|
if (Array.isArray(children[i])) {
|
|
|
return Array.prototype.concat.apply([], children)
|
|
return Array.prototype.concat.apply([], children)
|