|
@@ -408,11 +408,11 @@ export function cloneVNode<T, U>(
|
|
|
vnode: VNode<T, U>,
|
|
vnode: VNode<T, U>,
|
|
|
extraProps?: Data & VNodeProps
|
|
extraProps?: Data & VNodeProps
|
|
|
): VNode<T, U> {
|
|
): VNode<T, U> {
|
|
|
- const props = (extraProps
|
|
|
|
|
|
|
+ const props = extraProps
|
|
|
? vnode.props
|
|
? vnode.props
|
|
|
? mergeProps(vnode.props, extraProps)
|
|
? mergeProps(vnode.props, extraProps)
|
|
|
: extend({}, extraProps)
|
|
: extend({}, extraProps)
|
|
|
- : vnode.props) as any
|
|
|
|
|
|
|
+ : vnode.props
|
|
|
// This is intentionally NOT using spread or extend to avoid the runtime
|
|
// This is intentionally NOT using spread or extend to avoid the runtime
|
|
|
// key enumeration cost.
|
|
// key enumeration cost.
|
|
|
return {
|
|
return {
|
|
@@ -571,7 +571,7 @@ export function mergeProps(...args: (Data & VNodeProps)[]) {
|
|
|
const incoming = toMerge[key]
|
|
const incoming = toMerge[key]
|
|
|
if (existing !== incoming) {
|
|
if (existing !== incoming) {
|
|
|
ret[key] = existing
|
|
ret[key] = existing
|
|
|
- ? [].concat(existing as any, toMerge[key] as any)
|
|
|
|
|
|
|
+ ? [].concat(existing as any, toMerge[key])
|
|
|
: incoming
|
|
: incoming
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|