From 288ae0a8d9444365ad7438462e072c425150cbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Fri, 5 Feb 2021 19:55:45 +0100 Subject: [PATCH] feat(runtime-core): improve render context warning (#2496) Co-authored-by: Thorsten Luenborg --- packages/runtime-core/src/componentPublicInstance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 1e62f8b1..0269fdf6 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -349,7 +349,7 @@ export const PublicInstanceProxyHandlers: ProxyHandler = { )} 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.`