-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Version
2.5.19
Reproduction link
https://codepen.io/anon/pen/roaKMY
Steps to reproduce
open the link and open the console
What is expected?
console should not has error, and the result in dom should be empty
What is actually happening?
console shows "Cannot read property 'length' of undefined
at simpleNormalizeChildren"
before the version 2.5.16, it works fine, and I saw the source, when compile the template, function genChildren choose an error normalizationType, it should be ALWAYS_NORMALIZE
.
and I think there is something wrong when compiling v-for and component with an "undefined" list because I find this words in 'src/core/vdom/helpers/normalize-children.js'
:
vue/src/core/vdom/helpers/normalize-children.js
Lines 27 to 30 in d780dd2
// 2. When the children contains constructs that always generated nested Arrays, | |
// e.g. <template>, <slot>, v-for, or when the children is provided by user | |
// with hand-written render functions / JSX. In such cases a full normalization | |
// is needed to cater to all possible types of children values. |
niutech