fix(reactivity): use resetTracking instead of enableTracking (#2174)

This commit is contained in:
Yang Mingshan 2020-10-14 03:32:46 +08:00 committed by GitHub
parent 2e226cb465
commit 7cc09ca8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ import {
trigger, trigger,
ITERATE_KEY, ITERATE_KEY,
pauseTracking, pauseTracking,
enableTracking resetTracking
} from './effect' } from './effect'
import { import {
isObject, isObject,
@ -64,7 +64,7 @@ const arrayInstrumentations: Record<string, Function> = {}
arrayInstrumentations[key] = function(this: unknown[], ...args: unknown[]) { arrayInstrumentations[key] = function(this: unknown[], ...args: unknown[]) {
pauseTracking() pauseTracking()
const res = method.apply(this, args) const res = method.apply(this, args)
enableTracking() resetTracking()
return res return res
} }
}) })