]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(runtime-core): improve render context warning (#2496)
authorThorsten Lünborg <t.luenborg@googlemail.com>
Fri, 5 Feb 2021 18:55:45 +0000 (19:55 +0100)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 18:55:45 +0000 (19:55 +0100)
Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
packages/runtime-core/src/componentPublicInstance.ts

index 1e62f8b16c55c740d375730dfa73193933b9feb8..0269fdf66dbb7389614e59e2bd60015dfa4cb31b 100644 (file)
@@ -349,7 +349,7 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
           )} must be accessed via $data because it starts with a reserved ` +
             `character ("$" or "_") and is not proxied on the render context.`
         )
-      } else {
+      } else if (instance === currentRenderingInstance) {
         warn(
           `Property ${JSON.stringify(key)} was accessed during render ` +
             `but is not defined on instance.`