fix(runtime-core): avoid object prototype keys in property access cache (#2416)

This commit is contained in:
龙腾道 2020-10-20 05:11:28 +08:00 committed by GitHub
parent 7e6e903111
commit ba881f9190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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)