]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor(reactivity): hasOwnProperty add this parameter (#7233)
author <2553241022@qq.com>
Mon, 9 Jan 2023 14:21:32 +0000 (22:21 +0800)
committerGitHub <noreply@github.com>
Mon, 9 Jan 2023 14:21:32 +0000 (15:21 +0100)
hasOwnProperty adds this parameter and delete @ts-ignore

packages/reactivity/src/baseHandlers.ts

index 46240dba77c98463836c90958d95474e6d0f040d..45ecfa6d38ab820a5b8788f03dc602b03d7159c9 100644 (file)
@@ -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)