fix(runtime-core): class and style should be properly normalized in cloneVNode (#1967)

fix #1964
This commit is contained in:
HcySunYang
2020-08-26 21:37:28 +08:00
committed by GitHub
parent 2178473936
commit 9153fc2d8a
2 changed files with 51 additions and 5 deletions

View File

@@ -433,11 +433,7 @@ export function cloneVNode<T, U>(
// This is intentionally NOT using spread or extend to avoid the runtime
// key enumeration cost.
const { props, patchFlag } = vnode
const mergedProps = extraProps
? props
? mergeProps(props, extraProps)
: extend({}, extraProps)
: props
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props
return {
__v_isVNode: true,
[ReactiveFlags.SKIP]: true,