| 7806 | } |
| 7807 | |
| 7808 | function checkRootConstraints (el) { |
| 7809 | if (process.env.NODE_ENV !== 'production') { |
| 7810 | if (el.tag === 'slot' || el.tag === 'template') { |
| 7811 | warnOnce( |
| 7812 | "Cannot use <" + (el.tag) + "> as component root element because it may " + |
| 7813 | 'contain multiple nodes.' |
| 7814 | ); |
| 7815 | } |
| 7816 | if (el.attrsMap.hasOwnProperty('v-for')) { |
| 7817 | warnOnce( |
| 7818 | 'Cannot use v-for on stateful component root element because ' + |
| 7819 | 'it renders multiple elements.' |
| 7820 | ); |
| 7821 | } |
| 7822 | } |
| 7823 | } |
| 7824 | |
| 7825 | // tree management |
| 7826 | if (!root) { |