Skip to content

Commit aa820cb

Browse files
fenduruyyx990803
authored andcommitted
perf(core): prevent iteration of arrays that should not be observable (#6467)
close #6284
1 parent 3ee62fd commit aa820cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/observer/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function defineReactive (
157157
if (childOb) {
158158
childOb.dep.depend()
159159
}
160-
if (Array.isArray(value)) {
160+
if (Array.isArray(value) && Object.isExtensible(value)) {
161161
dependArray(value)
162162
}
163163
}

0 commit comments

Comments
 (0)