]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): avoid object prototype keys in property access cache (#2416)
author龙腾道 <LongTengDao@LongTengDao.com>
Mon, 19 Oct 2020 21:11:28 +0000 (05:11 +0800)
committerGitHub <noreply@github.com>
Mon, 19 Oct 2020 21:11:28 +0000 (17:11 -0400)
packages/runtime-core/src/component.ts

index 19035961c96bb46f18e30580a226edd9ecd96c70..3fea92ba4e5c79d448ed61babc99cbb855e54862 100644 (file)
@@ -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)