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

hasOwnProperty adds this parameter and delete @ts-ignore
This commit is contained in:
2023-01-09 22:21:32 +08:00 committed by GitHub
parent cd7c887b75
commit 13dc28aeff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View 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)