mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 20:17:52 +08:00
avoid traversing frozen objects in deep watch
This commit is contained in:
parent
51db34103a
commit
1d02463ced
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user