fix(reactivity): ensure readonly on plain arrays doesn't track array methods. (#2506)
fix #2493
This commit is contained in:
@@ -83,7 +83,8 @@ function createGetter(isReadonly = false, shallow = false) {
|
||||
}
|
||||
|
||||
const targetIsArray = isArray(target)
|
||||
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
||||
|
||||
if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
||||
return Reflect.get(arrayInstrumentations, key, receiver)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user