fix(runtime-core): fix component public instance has check for accessed non-existent properties
close #4962
This commit is contained in:
@@ -248,11 +248,11 @@ if (__COMPAT__) {
|
||||
}
|
||||
|
||||
const enum AccessTypes {
|
||||
OTHER,
|
||||
SETUP,
|
||||
DATA,
|
||||
PROPS,
|
||||
CONTEXT,
|
||||
OTHER
|
||||
CONTEXT
|
||||
}
|
||||
|
||||
export interface ComponentRenderContext {
|
||||
@@ -437,7 +437,7 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
|
||||
) {
|
||||
let normalizedProps
|
||||
return (
|
||||
accessCache![key] !== undefined ||
|
||||
!!accessCache![key] ||
|
||||
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
||||
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
||||
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
||||
|
||||
Reference in New Issue
Block a user