| 1746 | // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep |
| 1747 | // because functional components already normalize their own children. |
| 1748 | function simpleNormalizeChildren (children) { |
| 1749 | for (var i = 0; i < children.length; i++) { |
| 1750 | if (Array.isArray(children[i])) { |
| 1751 | return Array.prototype.concat.apply([], children) |
| 1752 | } |
| 1753 | } |
| 1754 | return children |
| 1755 | } |
| 1756 | |
| 1757 | // 2. When the children contains constructs that always generated nested Arrays, |
| 1758 | // e.g. <template>, <slot>, v-for, or when the children is provided by user |