2
0
Эх сурвалжийг харах

refactor(reactivity): hasOwnProperty add this parameter (#7233)

hasOwnProperty adds this parameter and delete @ts-ignore
3 жил өмнө
parent
commit
13dc28aeff

+ 1 - 2
packages/reactivity/src/baseHandlers.ts

@@ -85,8 +85,7 @@ function createArrayInstrumentations() {
   return instrumentations
 }
 
-function hasOwnProperty(key: string) {
-  // @ts-ignore
+function hasOwnProperty(this: object, key: string) {
   const obj = toRaw(this)
   track(obj, TrackOpTypes.HAS, key)
   return obj.hasOwnProperty(key)