|
@ -12,7 +12,7 @@ export function createElement ( |
|
|
tag: any, |
|
|
tag: any, |
|
|
data: any, |
|
|
data: any, |
|
|
children: any |
|
|
children: any |
|
|
): VNode | Array<VNode> | void { |
|
|
): VNode | void { |
|
|
if (data && (Array.isArray(data) || typeof data !== 'object')) { |
|
|
if (data && (Array.isArray(data) || typeof data !== 'object')) { |
|
|
children = data |
|
|
children = data |
|
|
data = undefined |
|
|
data = undefined |
|
@ -26,7 +26,7 @@ function _createElement ( |
|
|
tag?: string | Class<Component> | Function | Object, |
|
|
tag?: string | Class<Component> | Function | Object, |
|
|
data?: VNodeData, |
|
|
data?: VNodeData, |
|
|
children?: VNodeChildren | void |
|
|
children?: VNodeChildren | void |
|
|
): VNode | Array<VNode> | void { |
|
|
): VNode | void { |
|
|
if (data && data.__ob__) { |
|
|
if (data && data.__ob__) { |
|
|
process.env.NODE_ENV !== 'production' && warn( |
|
|
process.env.NODE_ENV !== 'production' && warn( |
|
|
`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\n` + |
|
|
`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\n` + |
|
|