Skip to content

Commit

Permalink
fix(runtime-core): avoid infinite warning loop for isRef check on com…
Browse files Browse the repository at this point in the history
…ponent public proxy

fix #1091
  • Loading branch information
yyx990803 committed May 1, 2020
1 parent 5b09e74 commit 6233608
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/runtime-core/src/componentProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,14 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
hasOwn(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)) {
warn(
`Property ${JSON.stringify(
Expand Down

0 comments on commit 6233608

Please sign in to comment.