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