mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
createElement won't return Array<VNode> (#3574)
This commit is contained in:
parent
a00170cbb9
commit
2998bbfae9
@ -12,7 +12,7 @@ export function createElement (
|
||||
tag: any,
|
||||
data: any,
|
||||
children: any
|
||||
): VNode | Array<VNode> | void {
|
||||
): VNode | void {
|
||||
if (data && (Array.isArray(data) || typeof data !== 'object')) {
|
||||
children = data
|
||||
data = undefined
|
||||
@ -26,7 +26,7 @@ function _createElement (
|
||||
tag?: string | Class<Component> | Function | Object,
|
||||
data?: VNodeData,
|
||||
children?: VNodeChildren | void
|
||||
): VNode | Array<VNode> | void {
|
||||
): VNode | void {
|
||||
if (data && data.__ob__) {
|
||||
process.env.NODE_ENV !== 'production' && warn(
|
||||
`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\n` +
|
||||
|
Loading…
Reference in New Issue
Block a user