(children)
| 8763 | // 1: simple normalization needed (possible 1-level deep nested array) |
| 8764 | // 2: full normalization needed |
| 8765 | function getNormalizationType (children) { |
| 8766 | var res = 0; |
| 8767 | for (var i = 0; i < children.length; i++) { |
| 8768 | var el = children[i]; |
| 8769 | if (el.type !== 1) { |
| 8770 | continue |
| 8771 | } |
| 8772 | if (needsNormalization(el) || |
| 8773 | (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) { |
| 8774 | res = 2; |
| 8775 | break |
| 8776 | } |
| 8777 | if (maybeComponent(el) || |
| 8778 | (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) { |
| 8779 | res = 1; |
| 8780 | } |
| 8781 | } |
| 8782 | return res |
| 8783 | } |
| 8784 | |
| 8785 | function needsNormalization (el) { |
| 8786 | return el.for !== undefined || el.tag === 'template' || el.tag === 'slot' |
no test coverage detected