fix(reactivity): avoid polluting Object prototype

This commit is contained in:
Evan You 2020-05-04 08:50:17 -04:00
parent d8c6f14b5e
commit f40f3a0e95

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) { } else if (key === ReactiveFlags.raw || key === '__proto__') {
return target return target
} }