Skip to content

Commit 6233608

Browse files
committed
fix(runtime-core): avoid infinite warning loop for isRef check on component public proxy
fix #1091
1 parent 5b09e74 commit 6233608

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/runtime-core/src/componentProxy.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,14 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
194194
hasOwn(globalProperties, key))
195195
) {
196196
return globalProperties[key]
197-
} else if (__DEV__ && currentRenderingInstance) {
197+
} else if (
198+
__DEV__ &&
199+
currentRenderingInstance &&
200+
// #1091 avoid isRef/isVNode checks on component instance leading to
201+
// infinite warning loop
202+
key !== '_isRef' &&
203+
key !== '_isVNode'
204+
) {
198205
if (data !== EMPTY_OBJ && key[0] === '$' && hasOwn(data, key)) {
199206
warn(
200207
`Property ${JSON.stringify(

0 commit comments

Comments
 (0)