@@ -14,14 +14,14 @@ export function createElement (
1414data :any ,
1515children :any ,
1616needNormalization :any ,
17- flipNormalization :boolean
17+ alwaysNormalize :boolean
1818) :VNode {
1919if ( Array . isArray ( data ) || isPrimitive ( data ) ) {
2020needNormalization = children
2121children = data
2222data = undefined
2323}
24- if ( flipNormalization ) needNormalization = ! needNormalization
24+ if ( alwaysNormalize ) needNormalization = true
2525return _createElement ( context , tag , data , children , needNormalization )
2626}
2727
@@ -51,14 +51,17 @@ export function _createElement (
5151data . scopedSlots = { default :children [ 0 ] }
5252children . length = 0
5353}
54+ if ( needNormalization ) {
55+ children= normalizeChildren ( children )
56+ }
5457let vnode , ns
5558if ( typeof tag === 'string' ) {
5659let Ctor
5760 ns= config . getTagNamespace ( tag )
5861if ( config . isReservedTag ( tag ) ) {
5962// platform built-in elements
6063 vnode= new VNode (
61- tag , data , needNormalization ? normalizeChildren ( children ) : children ,
64+ tag , data , children ,
6265undefined , undefined , context
6366)
6467} else if ( ( Ctor = resolveAsset ( context . $options , 'components' , tag ) ) ) {
@@ -70,7 +73,7 @@ export function _createElement (
7073// parent normalizes children
7174 ns= tag === 'foreignObject' ?'xhtml' :ns
7275vnode = new VNode (
73- tag , data , needNormalization ? normalizeChildren ( children ) : children ,
76+ tag , data , children ,
7477undefined , undefined , context
7578)
7679}