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