From 2998bbfae9c618b49d48152a078e14ecf74607f8 Mon Sep 17 00:00:00 2001 From: Zhenfei You Date: Wed, 31 Aug 2016 23:00:38 +0800 Subject: [PATCH] createElement won't return Array (#3574) --- src/core/vdom/create-element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/vdom/create-element.js b/src/core/vdom/create-element.js index cfda1ffb..268f88f7 100644 --- a/src/core/vdom/create-element.js +++ b/src/core/vdom/create-element.js @@ -12,7 +12,7 @@ export function createElement ( tag: any, data: any, children: any -): VNode | Array | void { +): VNode | void { if (data && (Array.isArray(data) || typeof data !== 'object')) { children = data data = undefined @@ -26,7 +26,7 @@ function _createElement ( tag?: string | Class | Function | Object, data?: VNodeData, children?: VNodeChildren | void -): VNode | Array | 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` +