]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): avoid infinite warning loop for isRef check on component public...
authorEvan You <yyx990803@gmail.com>
Fri, 1 May 2020 17:23:59 +0000 (13:23 -0400)
committerEvan You <yyx990803@gmail.com>
Fri, 1 May 2020 17:23:59 +0000 (13:23 -0400)
fix #1091

packages/runtime-core/src/componentProxy.ts

index e5fe0bdeea1a56636d9e735eb0fda20edff92f0d..71a056e85990004f8ef6162ac9343a14bc7a8dab 100644 (file)
@@ -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(