avoid traversing frozen objects in deep watch

This commit is contained in:
Evan You 2016-06-26 14:49:33 -04:00
parent 51db34103a
commit 1d02463ced

View File

@ -264,7 +264,7 @@ function traverse (val: any, seen?: Set) {
}
const isA = Array.isArray(val)
const isO = isObject(val)
if (isA || isO) {
if ((isA || isO) && Object.isExtensible(val)) {
if (val.__ob__) {
const depId = val.__ob__.dep.id
if (seen.has(depId)) {