fix: fix not saving cached computed options

This commit is contained in:
Evan You 2018-09-25 13:49:09 -04:00
parent 1106e2208d
commit 871947c25f
2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,7 @@ export function getComputedOptions(
// as it's already defined on the prototype
}
}
extractionCache.set(comp, computedOptions)
return computedOptions
}

View File

@ -110,7 +110,11 @@ export function normalizeComponentRoot(
componentVNode &&
(flags & VNodeFlags.COMPONENT || flags & VNodeFlags.ELEMENT)
) {
if (inheritAttrs !== false && attrs !== void 0) {
if (
inheritAttrs !== false &&
attrs !== void 0 &&
Object.keys(attrs).length > 0
) {
vnode = cloneVNode(vnode, attrs)
} else if (vnode.el) {
vnode = cloneVNode(vnode)