fix(runtime-core): avoid infinite warning loop for isRef check on component public proxy

fix #1091
This commit is contained in:
Evan You 2020-05-01 13:23:59 -04:00
parent 5b09e743a0
commit 62336085f4

View File

@ -194,7 +194,14 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
hasOwn(globalProperties, key)) hasOwn(globalProperties, key))
) { ) {
return globalProperties[key] return globalProperties[key]
} else if (__DEV__ && currentRenderingInstance) { } else if (
__DEV__ &&
currentRenderingInstance &&
// #1091 avoid isRef/isVNode checks on component instance leading to
// infinite warning loop
key !== '_isRef' &&
key !== '_isVNode'
) {
if (data !== EMPTY_OBJ && key[0] === '$' && hasOwn(data, key)) { if (data !== EMPTY_OBJ && key[0] === '$' && hasOwn(data, key)) {
warn( warn(
`Property ${JSON.stringify( `Property ${JSON.stringify(