fix(reactivity): fix __proto__ access on proxy objects (#1133)

This commit is contained in:
龙腾道 2020-05-06 21:08:44 +08:00 committed by GitHub
parent da7bdb7f9c
commit 037fa07113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ function createGetter(isReadonly = false, shallow = false) {
return !isReadonly return !isReadonly
} else if (key === ReactiveFlags.isReadonly) { } else if (key === ReactiveFlags.isReadonly) {
return isReadonly return isReadonly
} else if (key === ReactiveFlags.raw || key === '__proto__') { } else if (key === ReactiveFlags.raw) {
return target return target
} }
@ -49,7 +49,7 @@ function createGetter(isReadonly = false, shallow = false) {
} }
const res = Reflect.get(target, key, receiver) const res = Reflect.get(target, key, receiver)
if (isSymbol(key) && builtInSymbols.has(key)) { if (isSymbol(key) && builtInSymbols.has(key) || key === '__proto__') {
return res return res
} }