From e09d4bc0b8ecfdff42132c02715d59f931078440 Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+amsyarasyiq@users.noreply.github.com> Date: Sat, 9 Mar 2024 06:00:21 +0800 Subject: [PATCH] Use prototype-less object for `parentInjections` --- src/getPatchFunc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getPatchFunc.ts b/src/getPatchFunc.ts index dc89556..ae0c9e9 100644 --- a/src/getPatchFunc.ts +++ b/src/getPatchFunc.ts @@ -19,7 +19,7 @@ export default (patchType: PatchType) => `${funcName} is not a function in ${funcParent.constructor.name}` ); - if (!patchedObjects.has(funcParent)) patchedObjects.set(funcParent, {}); + if (!patchedObjects.has(funcParent)) patchedObjects.set(funcParent, Object.create(null)); const parentInjections = patchedObjects.get(funcParent);