From 037fa07113eff6792cda58f91169d26cf6033aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E9=81=93?= Date: Wed, 6 May 2020 21:08:44 +0800 Subject: [PATCH] fix(reactivity): fix __proto__ access on proxy objects (#1133) --- packages/reactivity/src/baseHandlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 40475386..5bebe564 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -39,7 +39,7 @@ function createGetter(isReadonly = false, shallow = false) { return !isReadonly } else if (key === ReactiveFlags.isReadonly) { return isReadonly - } else if (key === ReactiveFlags.raw || key === '__proto__') { + } else if (key === ReactiveFlags.raw) { return target } @@ -49,7 +49,7 @@ function createGetter(isReadonly = false, shallow = false) { } const res = Reflect.get(target, key, receiver) - if (isSymbol(key) && builtInSymbols.has(key)) { + if (isSymbol(key) && builtInSymbols.has(key) || key === '__proto__') { return res }