fix(runtime-core): only set cache for object keys (#6266)
This commit is contained in:
parent
2024d11db0
commit
c3465c1e88
@ -7,6 +7,7 @@ import {
|
|||||||
hyphenate,
|
hyphenate,
|
||||||
isArray,
|
isArray,
|
||||||
isFunction,
|
isFunction,
|
||||||
|
isObject,
|
||||||
isOn,
|
isOn,
|
||||||
toNumber,
|
toNumber,
|
||||||
UnionToIntersection
|
UnionToIntersection
|
||||||
@ -226,7 +227,9 @@ export function normalizeEmitsOptions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!raw && !hasExtends) {
|
if (!raw && !hasExtends) {
|
||||||
|
if (isObject(comp)) {
|
||||||
cache.set(comp, null)
|
cache.set(comp, null)
|
||||||
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +239,9 @@ export function normalizeEmitsOptions(
|
|||||||
extend(normalized, raw)
|
extend(normalized, raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isObject(comp)) {
|
||||||
cache.set(comp, normalized)
|
cache.set(comp, normalized)
|
||||||
|
}
|
||||||
return normalized
|
return normalized
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -966,8 +966,9 @@ export function resolveMergedOptions(
|
|||||||
}
|
}
|
||||||
mergeOptions(resolved, base, optionMergeStrategies)
|
mergeOptions(resolved, base, optionMergeStrategies)
|
||||||
}
|
}
|
||||||
|
if (isObject(base)) {
|
||||||
cache.set(base, resolved)
|
cache.set(base, resolved)
|
||||||
|
}
|
||||||
return resolved
|
return resolved
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,7 +494,9 @@ export function normalizePropsOptions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!raw && !hasExtends) {
|
if (!raw && !hasExtends) {
|
||||||
|
if (isObject(comp)) {
|
||||||
cache.set(comp, EMPTY_ARR as any)
|
cache.set(comp, EMPTY_ARR as any)
|
||||||
|
}
|
||||||
return EMPTY_ARR as any
|
return EMPTY_ARR as any
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +536,9 @@ export function normalizePropsOptions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const res: NormalizedPropsOptions = [normalized, needCastKeys]
|
const res: NormalizedPropsOptions = [normalized, needCastKeys]
|
||||||
|
if (isObject(comp)) {
|
||||||
cache.set(comp, res)
|
cache.set(comp, res)
|
||||||
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user