From ba881f9190510c613f04950b69d78f6af1a90e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E9=81=93?= Date: Tue, 20 Oct 2020 05:11:28 +0800 Subject: [PATCH] fix(runtime-core): avoid object prototype keys in property access cache (#2416) --- packages/runtime-core/src/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 19035961..3fea92ba 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -549,7 +549,7 @@ function setupStatefulComponent( } } // 0. create render proxy property access cache - instance.accessCache = {} + instance.accessCache = Object.create(null) // 1. create public instance / render proxy // also mark it raw so it's never observed instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers)