Skip to content

Commit

Permalink
fix(reactivity): fix __proto__ access on proxy objects (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
LongTengDao authored May 6, 2020
1 parent da7bdb7 commit 037fa07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/reactivity/src/baseHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 037fa07

Please sign in to comment.