From b4c0cd8f377aea320fbb7b2a27edd1efa5a7f72b Mon Sep 17 00:00:00 2001 From: GerkinDev Date: Tue, 7 Sep 2021 23:33:29 +0200 Subject: [PATCH] fix: isPrototypeAccess get prototype from `context` instead of `this`. #58 --- src/utils/isPrototypeAccess.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/isPrototypeAccess.ts b/src/utils/isPrototypeAccess.ts index 9c61281..3db1695 100644 --- a/src/utils/isPrototypeAccess.ts +++ b/src/utils/isPrototypeAccess.ts @@ -1,5 +1,5 @@ export function isPrototypeAccess(context: object, target: object): boolean { return context === target || (context.constructor !== target.constructor - && Object.getPrototypeOf(this).constructor === target.constructor); + && Object.getPrototypeOf(context).constructor === target.constructor); }