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